Browse code

Use golang official image instead debian stretch

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Vincent Demeester authored on 2018/02/27 17:20:55
Showing 1 changed files
... ...
@@ -32,23 +32,14 @@
32 32
 # the case. Therefore, you don't have to disable it anymore.
33 33
 #
34 34
 
35
-FROM buildpack-deps:stretch AS base
35
+FROM golang:1.9.4 AS base
36
+# FIXME(vdemeester) this is kept for other script depending on it to not fail right away
37
+# Remove this once the other scripts uses something else to detect the version
38
+ENV GO_VERSION 1.9.4
36 39
 # allow replacing httpredir or deb mirror
37 40
 ARG APT_MIRROR=deb.debian.org
38 41
 RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
39 42
 
40
-
41
-FROM base AS golang
42
-# IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
43
-#            will need updating, to avoid errors. Ping #docker-maintainers on IRC
44
-#            with a heads-up.
45
-# IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored
46
-ENV GO_VERSION 1.9.4
47
-RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
48
-	| tar -xzC /usr/local
49
-ENV PATH=/usr/local/go/bin:/go/bin:$PATH GOPATH=/go
50
-
51
-
52 43
 FROM base AS criu
53 44
 # Install CRIU for checkpoint/restore support
54 45
 ENV CRIU_VERSION 3.6
... ...
@@ -69,7 +60,7 @@ RUN apt-get update && apt-get install -y \
69 69
 	&& make PREFIX=/opt/criu install-criu
70 70
 
71 71
 
72
-FROM golang AS registry
72
+FROM base AS registry
73 73
 # Install two versions of the registry. The first is an older version that
74 74
 # only supports schema1 manifests. The second is a newer version that supports
75 75
 # both. This allows integration-cli tests to cover push/pull with both schema1
... ...
@@ -89,7 +80,7 @@ RUN set -x \
89 89
 
90 90
 
91 91
 
92
-FROM golang AS notary
92
+FROM base AS notary
93 93
 # Install notary and notary-server
94 94
 ENV NOTARY_VERSION v0.5.0
95 95
 RUN set -x \
... ...
@@ -113,7 +104,7 @@ RUN git clone https://github.com/docker/docker-py.git /docker-py \
113 113
 
114 114
 
115 115
 
116
-FROM golang AS swagger
116
+FROM base AS swagger
117 117
 # Install go-swagger for validating swagger.yaml
118 118
 ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb
119 119
 RUN set -x \
... ...
@@ -124,7 +115,7 @@ RUN set -x \
124 124
 	&& rm -rf "$GOPATH"
125 125
 
126 126
 
127
-FROM golang AS frozen-images
127
+FROM base AS frozen-images
128 128
 RUN apt-get update && apt-get install -y jq ca-certificates --no-install-recommends
129 129
 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling
130 130
 COPY contrib/download-frozen-image-v2.sh /
... ...
@@ -136,44 +127,44 @@ RUN /download-frozen-image-v2.sh /docker-frozen-images \
136 136
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
137 137
 
138 138
 # Just a little hack so we don't have to install these deps twice, once for runc and once for dockerd
139
-FROM golang AS runtime-dev
139
+FROM base AS runtime-dev
140 140
 RUN apt-get update && apt-get install -y \
141 141
 	libapparmor-dev \
142 142
 	libseccomp-dev
143 143
 
144 144
 
145
-FROM golang AS tomlv
145
+FROM base AS tomlv
146 146
 ENV INSTALL_BINARY_NAME=tomlv
147 147
 COPY hack/dockerfile/install/install.sh ./install.sh
148 148
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
149 149
 RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME
150 150
 
151
-FROM golang AS vndr
151
+FROM base AS vndr
152 152
 ENV INSTALL_BINARY_NAME=vndr
153 153
 COPY hack/dockerfile/install/install.sh ./install.sh
154 154
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
155 155
 RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME
156 156
 
157
-FROM golang AS containerd
157
+FROM base AS containerd
158 158
 RUN apt-get update && apt-get install -y btrfs-tools
159 159
 ENV INSTALL_BINARY_NAME=containerd
160 160
 COPY hack/dockerfile/install/install.sh ./install.sh
161 161
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
162 162
 RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME
163 163
 
164
-FROM golang AS proxy
164
+FROM base AS proxy
165 165
 ENV INSTALL_BINARY_NAME=proxy
166 166
 COPY hack/dockerfile/install/install.sh ./install.sh
167 167
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
168 168
 RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME
169 169
 
170
-FROM golang AS gometalinter
170
+FROM base AS gometalinter
171 171
 ENV INSTALL_BINARY_NAME=gometalinter
172 172
 COPY hack/dockerfile/install/install.sh ./install.sh
173 173
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
174 174
 RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME
175 175
 
176
-FROM golang AS dockercli
176
+FROM base AS dockercli
177 177
 ENV INSTALL_BINARY_NAME=dockercli
178 178
 COPY hack/dockerfile/install/install.sh ./install.sh
179 179
 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
... ...
@@ -231,6 +222,8 @@ RUN apt-get update && apt-get install -y \
231 231
 	vim-common \
232 232
 	xfsprogs \
233 233
 	zip \
234
+	bzip2 \
235
+	xz-utils \
234 236
 	--no-install-recommends
235 237
 COPY --from=swagger /usr/local/bin/swagger* /usr/local/bin/
236 238
 COPY --from=frozen-images /docker-frozen-images /docker-frozen-images