Kaynağa Gözat

Merge pull request #2420 from thaJeztah/golang_arg

Dockerfile: use GO_VERSION build-arg for overriding Go version
elangovan sivanandam 6 yıl önce
ebeveyn
işleme
0acdd724ae
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 3 1
      libnetwork/Dockerfile
  2. 1 1
      libnetwork/Makefile

+ 3 - 1
libnetwork/Dockerfile

@@ -1,4 +1,6 @@
-FROM golang:1.12.6 as dev
+ARG GO_VERSION=1.12.6
+
+FROM golang:${GO_VERSION} as dev
 RUN apt-get update && apt-get -y install iptables \
 		protobuf-compiler
 

+ 1 - 1
libnetwork/Makefile

@@ -36,7 +36,7 @@ all-local: build-local check-local clean
 # builder builds the libnetworkbuild container.  All wrapper targets
 # must depend on this to ensure that the container exists.
 builder:
-	docker build -t ${build_image} ${dockerbuildargs}
+	docker build -t ${build_image} --build-arg=GO_VERSION ${dockerbuildargs}
 
 build: builder
 	@echo "🐳 $@"