Skip to content

Commit ba9e1ea

Browse files
committed
contrib: Dockerfile: use build-arg for go-version
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent eea500d commit ba9e1ea

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

contrib/Dockerfile.test

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66
# 3.) $ make binaries install test
77
#
88

9+
ARG GOLANG_VERSION=1.11
10+
911
# Install proto3
10-
FROM golang:1.11 AS proto3
12+
FROM golang:${GOLANG_VERSION} AS proto3
1113
RUN apt-get update && apt-get install -y autoconf automake g++ libtool unzip
1214
COPY script/setup/install-protobuf install-protobuf
1315
RUN ./install-protobuf
1416

1517
# Install runc
16-
FROM golang:1.11 AS runc
18+
FROM golang:${GOLANG_VERSION} AS runc
1719
RUN apt-get update && apt-get install -y curl libseccomp-dev
1820
COPY vendor.conf /go/src/github.com/containerd/containerd/vendor.conf
1921
COPY script/setup/install-runc install-runc
2022
RUN ./install-runc
2123

22-
FROM golang:1.11
24+
FROM golang:${GOLANG_VERSION} AS dev
2325
RUN apt-get update && apt-get install -y btrfs-tools gcc git libseccomp-dev make xfsprogs
2426

2527
COPY --from=proto3 /usr/local/bin/protoc /usr/local/bin/protoc

0 commit comments

Comments
 (0)