Browse code

Dockerfile.simple: simplify by using golang img

Instead of installing golang from sources, it's easier to use
golang image which is based on Debian Stretch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2018/08/29 04:43:35
Showing 1 changed files
... ...
@@ -5,7 +5,7 @@
5 5
 
6 6
 # This represents the bare minimum required to build and test Docker.
7 7
 
8
-FROM debian:stretch
8
+FROM golang:1.10.4-stretch
9 9
 
10 10
 # allow replacing httpredir or deb mirror
11 11
 ARG APT_MIRROR=deb.debian.org
... ...
@@ -37,18 +37,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
37 37
 		vim-common \
38 38
 	&& rm -rf /var/lib/apt/lists/*
39 39
 
40
-# Install Go
41
-# IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
42
-#            will need updating, to avoid errors. Ping #docker-maintainers on IRC
43
-#            with a heads-up.
44
-# IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored
45
-ENV GO_VERSION 1.10.4
46
-RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
47
-	| tar -xzC /usr/local
48
-ENV PATH /go/bin:/usr/local/go/bin:$PATH
49
-ENV GOPATH /go
50
-ENV CGO_LDFLAGS -L/lib
51
-
52 40
 # Install runc, containerd, tini and docker-proxy
53 41
 # Please edit hack/dockerfile/install/<name>.installer to update them.
54 42
 COPY hack/dockerfile/install hack/dockerfile/install