-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Update golang #8629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update golang #8629
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - docker-library/golang@cc46c82: Merge pull request docker-library/golang#339 from infosiftr/jq-template - docker-library/golang@5e97006: Add initial jq-based templating engine
Diff for 8a1882d:diff --git a/_bashbrew-cat b/_bashbrew-cat
index cc4f166..6fcb55d 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,74 +3,74 @@ GitRepo: https://github.com/docker-library/golang.git
Tags: 1.14.7-alpine3.11, 1.14-alpine3.11
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/alpine3.11
Tags: 1.14.7-alpine3.12, 1.14-alpine3.12, 1.14.7-alpine, 1.14-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/alpine3.12
Tags: 1.14.7-buster, 1.14-buster
SharedTags: 1.14.7, 1.14
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/buster
Tags: 1.14.7-nanoserver-1809, 1.14-nanoserver-1809
SharedTags: 1.14.7-nanoserver, 1.14-nanoserver
Architectures: windows-amd64
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/windows/nanoserver-1809
Constraints: nanoserver-1809, windowsservercore-1809
Tags: 1.14.7-stretch, 1.14-stretch
Architectures: amd64, arm32v7, arm64v8, i386
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/stretch
Tags: 1.14.7-windowsservercore-1809, 1.14-windowsservercore-1809
SharedTags: 1.14.7-windowsservercore, 1.14-windowsservercore, 1.14.7, 1.14
Architectures: windows-amd64
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/windows/windowsservercore-1809
Constraints: windowsservercore-1809
Tags: 1.14.7-windowsservercore-ltsc2016, 1.14-windowsservercore-ltsc2016
SharedTags: 1.14.7-windowsservercore, 1.14-windowsservercore, 1.14.7, 1.14
Architectures: windows-amd64
-GitCommit: fed0549d09ff8ccd64e59e17af8811018ec3cef1
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.14/windows/windowsservercore-ltsc2016
Constraints: windowsservercore-ltsc2016
Tags: 1.15.0-alpine3.12, 1.15-alpine3.12, 1-alpine3.12, alpine3.12, 1.15.0-alpine, 1.15-alpine, 1-alpine, alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 4d68c4dd8b51f83ce4fdce0f62484fdc1315bfa8
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.15/alpine3.12
Tags: 1.15.0-buster, 1.15-buster, 1-buster, buster
SharedTags: 1.15.0, 1.15, 1, latest
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 4d68c4dd8b51f83ce4fdce0f62484fdc1315bfa8
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.15/buster
Tags: 1.15.0-nanoserver-1809, 1.15-nanoserver-1809, 1-nanoserver-1809, nanoserver-1809
SharedTags: 1.15.0-nanoserver, 1.15-nanoserver, 1-nanoserver, nanoserver
Architectures: windows-amd64
-GitCommit: 4d68c4dd8b51f83ce4fdce0f62484fdc1315bfa8
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.15/windows/nanoserver-1809
Constraints: nanoserver-1809, windowsservercore-1809
Tags: 1.15.0-windowsservercore-1809, 1.15-windowsservercore-1809, 1-windowsservercore-1809, windowsservercore-1809
SharedTags: 1.15.0-windowsservercore, 1.15-windowsservercore, 1-windowsservercore, windowsservercore, 1.15.0, 1.15, 1, latest
Architectures: windows-amd64
-GitCommit: 4d68c4dd8b51f83ce4fdce0f62484fdc1315bfa8
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.15/windows/windowsservercore-1809
Constraints: windowsservercore-1809
Tags: 1.15.0-windowsservercore-ltsc2016, 1.15-windowsservercore-ltsc2016, 1-windowsservercore-ltsc2016, windowsservercore-ltsc2016
SharedTags: 1.15.0-windowsservercore, 1.15-windowsservercore, 1-windowsservercore, windowsservercore, 1.15.0, 1.15, 1, latest
Architectures: windows-amd64
-GitCommit: 4d68c4dd8b51f83ce4fdce0f62484fdc1315bfa8
+GitCommit: 5e970060c3d8916095bc1dadacdd76754305c3c2
Directory: 1.15/windows/windowsservercore-ltsc2016
Constraints: windowsservercore-ltsc2016
diff --git a/golang_1.14-alpine/Dockerfile b/golang_1.14-alpine/Dockerfile
index e131734..f513d78 100644
--- a/golang_1.14-alpine/Dockerfile
+++ b/golang_1.14-alpine/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM alpine:3.12
RUN apk add --no-cache \
@@ -8,15 +14,18 @@ RUN apk add --no-cache \
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
+ENV PATH /usr/local/go/bin:$PATH
+
ENV GOLANG_VERSION 1.14.7
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
bash \
gcc \
+ gnupg \
+ go \
musl-dev \
openssl \
- go \
; \
export \
# set GOROOT_BOOTSTRAP such that we can actually build Go
@@ -37,28 +46,53 @@ RUN set -eux; \
x86) export GO386='387' ;; \
esac; \
\
- wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
- echo '064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3 *go.tgz' | sha256sum -c -; \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ url='https://storage.googleapis.com/golang/go1.14.7.src.tar.gz'; \
+ sha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
+ \
+ wget -O go.tgz.asc "$url.asc"; \
+ wget -O go.tgz "$url"; \
+ echo "$sha256 *go.tgz" | sha256sum -c -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
+ goEnv="$(go env | sed -rn -e '/^GO(OS|ARCH|ARM|386)=/s//export \0/p')"; \
+ eval "$goEnv"; \
+ [ -n "$GOOS" ]; \
+ [ -n "$GOARCH" ]; \
+ ( \
cd /usr/local/go/src; \
./make.bash; \
+ ); \
+ \
+ apk del --no-network .build-deps; \
\
+# pre-compile the standard library, just like the official binary release tarballs do
+ go install std; \
+# go install: -race is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
+# go install -race std; \
+ \
+# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain
rm -rf \
-# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
+ /usr/local/go/pkg/*/cmd \
/usr/local/go/pkg/bootstrap \
-# https://golang.org/cl/82095
-# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
/usr/local/go/pkg/obj \
+ /usr/local/go/pkg/tool/*/api \
+ /usr/local/go/pkg/tool/*/go_bootstrap \
+ /usr/local/go/src/cmd/dist/dist \
; \
- apk del .build-deps; \
\
- export PATH="/usr/local/go/bin:$PATH"; \
go version
ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-
+ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
diff --git a/golang_1.14-alpine3.11/Dockerfile b/golang_1.14-alpine3.11/Dockerfile
index 4f4cddd..f46d661 100644
--- a/golang_1.14-alpine3.11/Dockerfile
+++ b/golang_1.14-alpine3.11/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM alpine:3.11
RUN apk add --no-cache \
@@ -8,15 +14,18 @@ RUN apk add --no-cache \
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
+ENV PATH /usr/local/go/bin:$PATH
+
ENV GOLANG_VERSION 1.14.7
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
bash \
gcc \
+ gnupg \
+ go \
musl-dev \
openssl \
- go \
; \
export \
# set GOROOT_BOOTSTRAP such that we can actually build Go
@@ -37,28 +46,53 @@ RUN set -eux; \
x86) export GO386='387' ;; \
esac; \
\
- wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
- echo '064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3 *go.tgz' | sha256sum -c -; \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ url='https://storage.googleapis.com/golang/go1.14.7.src.tar.gz'; \
+ sha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
+ \
+ wget -O go.tgz.asc "$url.asc"; \
+ wget -O go.tgz "$url"; \
+ echo "$sha256 *go.tgz" | sha256sum -c -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
+ goEnv="$(go env | sed -rn -e '/^GO(OS|ARCH|ARM|386)=/s//export \0/p')"; \
+ eval "$goEnv"; \
+ [ -n "$GOOS" ]; \
+ [ -n "$GOARCH" ]; \
+ ( \
cd /usr/local/go/src; \
./make.bash; \
+ ); \
+ \
+ apk del --no-network .build-deps; \
\
+# pre-compile the standard library, just like the official binary release tarballs do
+ go install std; \
+# go install: -race is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
+# go install -race std; \
+ \
+# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain
rm -rf \
-# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
+ /usr/local/go/pkg/*/cmd \
/usr/local/go/pkg/bootstrap \
-# https://golang.org/cl/82095
-# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
/usr/local/go/pkg/obj \
+ /usr/local/go/pkg/tool/*/api \
+ /usr/local/go/pkg/tool/*/go_bootstrap \
+ /usr/local/go/src/cmd/dist/dist \
; \
- apk del .build-deps; \
\
- export PATH="/usr/local/go/bin:$PATH"; \
go version
ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-
+ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
diff --git a/golang_1.14-buster/Dockerfile b/golang_1.14-buster/Dockerfile
index d627382..e07277f 100644
--- a/golang_1.14-buster/Dockerfile
+++ b/golang_1.14-buster/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM buildpack-deps:buster-scm
# gcc for cgo
@@ -15,27 +21,64 @@ ENV GOLANG_VERSION 1.14.7
RUN set -eux; \
\
-# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
- amd64) goRelArch='linux-amd64'; goRelSha256='4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5' ;; \
- armhf) goRelArch='linux-armv6l'; goRelSha256='6079eb82bcf24b33dda0e32777c7fdddcc3b1ec70e374308cc8311562449b107' ;; \
- arm64) goRelArch='linux-arm64'; goRelSha256='fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71' ;; \
- i386) goRelArch='linux-386'; goRelSha256='2f5793f10bb6b08eedecd376aa3d594e10193c6b5cf198ada46200259ff76547' ;; \
- ppc64el) goRelArch='linux-ppc64le'; goRelSha256='bd1f12a2271a6d1689bcf3ec01d123c81cbaca5d16c3f7df294a2d725ac4d3d1' ;; \
- s390x) goRelArch='linux-s390x'; goRelSha256='ea570b3caa0c271da440f568ab646cfea80d712c51fb4d08189bb66bd5eb949c' ;; \
- *) goRelArch='src'; goRelSha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
- echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+ 'amd64') \
+ arch='linux-amd64'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-amd64.tar.gz'; \
+ sha256='4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5'; \
+ ;; \
+ 'armhf') \
+ arch='linux-armv6l'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-armv6l.tar.gz'; \
+ sha256='6079eb82bcf24b33dda0e32777c7fdddcc3b1ec70e374308cc8311562449b107'; \
+ ;; \
+ 'arm64') \
+ arch='linux-arm64'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-arm64.tar.gz'; \
+ sha256='fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71'; \
+ ;; \
+ 'i386') \
+ arch='linux-386'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-386.tar.gz'; \
+ sha256='2f5793f10bb6b08eedecd376aa3d594e10193c6b5cf198ada46200259ff76547'; \
+ ;; \
+ 'ppc64el') \
+ arch='linux-ppc64le'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-ppc64le.tar.gz'; \
+ sha256='bd1f12a2271a6d1689bcf3ec01d123c81cbaca5d16c3f7df294a2d725ac4d3d1'; \
+ ;; \
+ 's390x') \
+ arch='linux-s390x'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-s390x.tar.gz'; \
+ sha256='ea570b3caa0c271da440f568ab646cfea80d712c51fb4d08189bb66bd5eb949c'; \
+ ;; \
+ *) \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ arch='src'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.src.tar.gz'; \
+ sha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
+ echo >&2; \
+ echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; \
+ echo >&2; \
+ ;; \
esac; \
\
- url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+ wget -O go.tgz.asc "$url.asc" --progress=dot:giga; \
wget -O go.tgz "$url" --progress=dot:giga; \
- echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+ echo "$sha256 *go.tgz" | sha256sum --strict --check -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
-# https://github.com/golang/go/issues/38536#issuecomment-616897960
- if [ "$goRelArch" = 'src' ]; then \
+ if [ "$arch" = 'src' ]; then \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends golang-go; \
diff --git a/golang_1.14-nanoserver-1809/Dockerfile b/golang_1.14-nanoserver-1809/Dockerfile
index 49f40b5..05137cf 100644
--- a/golang_1.14-nanoserver-1809/Dockerfile
+++ b/golang_1.14-nanoserver-1809/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/nanoserver:1809
SHELL ["cmd", "/S", "/C"]
diff --git a/golang_1.14-stretch/Dockerfile b/golang_1.14-stretch/Dockerfile
index aae7651..9260c56 100644
--- a/golang_1.14-stretch/Dockerfile
+++ b/golang_1.14-stretch/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM buildpack-deps:stretch-scm
# gcc for cgo
@@ -15,27 +21,64 @@ ENV GOLANG_VERSION 1.14.7
RUN set -eux; \
\
-# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
- amd64) goRelArch='linux-amd64'; goRelSha256='4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5' ;; \
- armhf) goRelArch='linux-armv6l'; goRelSha256='6079eb82bcf24b33dda0e32777c7fdddcc3b1ec70e374308cc8311562449b107' ;; \
- arm64) goRelArch='linux-arm64'; goRelSha256='fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71' ;; \
- i386) goRelArch='linux-386'; goRelSha256='2f5793f10bb6b08eedecd376aa3d594e10193c6b5cf198ada46200259ff76547' ;; \
- ppc64el) goRelArch='linux-ppc64le'; goRelSha256='bd1f12a2271a6d1689bcf3ec01d123c81cbaca5d16c3f7df294a2d725ac4d3d1' ;; \
- s390x) goRelArch='linux-s390x'; goRelSha256='ea570b3caa0c271da440f568ab646cfea80d712c51fb4d08189bb66bd5eb949c' ;; \
- *) goRelArch='src'; goRelSha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
- echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+ 'amd64') \
+ arch='linux-amd64'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-amd64.tar.gz'; \
+ sha256='4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5'; \
+ ;; \
+ 'armhf') \
+ arch='linux-armv6l'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-armv6l.tar.gz'; \
+ sha256='6079eb82bcf24b33dda0e32777c7fdddcc3b1ec70e374308cc8311562449b107'; \
+ ;; \
+ 'arm64') \
+ arch='linux-arm64'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-arm64.tar.gz'; \
+ sha256='fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71'; \
+ ;; \
+ 'i386') \
+ arch='linux-386'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-386.tar.gz'; \
+ sha256='2f5793f10bb6b08eedecd376aa3d594e10193c6b5cf198ada46200259ff76547'; \
+ ;; \
+ 'ppc64el') \
+ arch='linux-ppc64le'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-ppc64le.tar.gz'; \
+ sha256='bd1f12a2271a6d1689bcf3ec01d123c81cbaca5d16c3f7df294a2d725ac4d3d1'; \
+ ;; \
+ 's390x') \
+ arch='linux-s390x'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.linux-s390x.tar.gz'; \
+ sha256='ea570b3caa0c271da440f568ab646cfea80d712c51fb4d08189bb66bd5eb949c'; \
+ ;; \
+ *) \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ arch='src'; \
+ url='https://storage.googleapis.com/golang/go1.14.7.src.tar.gz'; \
+ sha256='064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3'; \
+ echo >&2; \
+ echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; \
+ echo >&2; \
+ ;; \
esac; \
\
- url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+ wget -O go.tgz.asc "$url.asc" --progress=dot:giga; \
wget -O go.tgz "$url" --progress=dot:giga; \
- echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+ echo "$sha256 *go.tgz" | sha256sum --strict --check -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
-# https://github.com/golang/go/issues/38536#issuecomment-616897960
- if [ "$goRelArch" = 'src' ]; then \
+ if [ "$arch" = 'src' ]; then \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends golang-go; \
diff --git a/golang_1.14-windowsservercore-1809/Dockerfile b/golang_1.14-windowsservercore-1809/Dockerfile
index 87cf720..05e43bf 100644
--- a/golang_1.14-windowsservercore-1809/Dockerfile
+++ b/golang_1.14-windowsservercore-1809/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/servercore:1809
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -48,7 +54,7 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
ENV GOLANG_VERSION 1.14.7
-RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+RUN $url = 'https://storage.googleapis.com/golang/go1.14.7.windows-amd64.zip'; \
Write-Host ('Downloading {0} ...' -f $url); \
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
\
diff --git a/golang_1.14-windowsservercore-ltsc2016/Dockerfile b/golang_1.14-windowsservercore-ltsc2016/Dockerfile
index 5e651d1..7711c14 100644
--- a/golang_1.14-windowsservercore-ltsc2016/Dockerfile
+++ b/golang_1.14-windowsservercore-ltsc2016/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/servercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -48,7 +54,7 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
ENV GOLANG_VERSION 1.14.7
-RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+RUN $url = 'https://storage.googleapis.com/golang/go1.14.7.windows-amd64.zip'; \
Write-Host ('Downloading {0} ...' -f $url); \
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
\
diff --git a/golang_alpine/Dockerfile b/golang_alpine/Dockerfile
index 4580739..b9e71cd 100644
--- a/golang_alpine/Dockerfile
+++ b/golang_alpine/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM alpine:3.12
RUN apk add --no-cache \
@@ -8,15 +14,18 @@ RUN apk add --no-cache \
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
+ENV PATH /usr/local/go/bin:$PATH
+
ENV GOLANG_VERSION 1.15
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
bash \
gcc \
+ gnupg \
+ go \
musl-dev \
openssl \
- go \
; \
export \
# set GOROOT_BOOTSTRAP such that we can actually build Go
@@ -37,28 +46,53 @@ RUN set -eux; \
x86) export GO386='387' ;; \
esac; \
\
- wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
- echo '69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a *go.tgz' | sha256sum -c -; \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ url='https://storage.googleapis.com/golang/go1.15.src.tar.gz'; \
+ sha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a'; \
+ \
+ wget -O go.tgz.asc "$url.asc"; \
+ wget -O go.tgz "$url"; \
+ echo "$sha256 *go.tgz" | sha256sum -c -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
+ goEnv="$(go env | sed -rn -e '/^GO(OS|ARCH|ARM|386)=/s//export \0/p')"; \
+ eval "$goEnv"; \
+ [ -n "$GOOS" ]; \
+ [ -n "$GOARCH" ]; \
+ ( \
cd /usr/local/go/src; \
./make.bash; \
+ ); \
+ \
+ apk del --no-network .build-deps; \
\
+# pre-compile the standard library, just like the official binary release tarballs do
+ go install std; \
+# go install: -race is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
+# go install -race std; \
+ \
+# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain
rm -rf \
-# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
+ /usr/local/go/pkg/*/cmd \
/usr/local/go/pkg/bootstrap \
-# https://golang.org/cl/82095
-# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
/usr/local/go/pkg/obj \
+ /usr/local/go/pkg/tool/*/api \
+ /usr/local/go/pkg/tool/*/go_bootstrap \
+ /usr/local/go/src/cmd/dist/dist \
; \
- apk del .build-deps; \
\
- export PATH="/usr/local/go/bin:$PATH"; \
go version
ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-
+ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
diff --git a/golang_buster/Dockerfile b/golang_buster/Dockerfile
index 7d84c47..211b352 100644
--- a/golang_buster/Dockerfile
+++ b/golang_buster/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM buildpack-deps:buster-scm
# gcc for cgo
@@ -15,27 +21,64 @@ ENV GOLANG_VERSION 1.15
RUN set -eux; \
\
-# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
- amd64) goRelArch='linux-amd64'; goRelSha256='2d75848ac606061efe52a8068d0e647b35ce487a15bb52272c427df485193602' ;; \
- armhf) goRelArch='linux-armv6l'; goRelSha256='6d8914ddd25f85f2377c269ccfb359acf53adf71a42cdbf53434a7c76fa7a9bd' ;; \
- arm64) goRelArch='linux-arm64'; goRelSha256='7e18d92f61ddf480a4f9a57db09389ae7b9dadf68470d0cb9c00d734a0c57f8d' ;; \
- i386) goRelArch='linux-386'; goRelSha256='68ce979083126694ceef60233f69efe870f54af24d81a120f76265107a9e9aab' ;; \
- ppc64el) goRelArch='linux-ppc64le'; goRelSha256='4603736a158b3d8ac52b9245f39bf715936c801e05bb5ad7c44b1edd6d5ef6a2' ;; \
- s390x) goRelArch='linux-s390x'; goRelSha256='8825f93caaf87465e32f298408c48b98d4180f3ddb885bd027f2926e711d23e8' ;; \
- *) goRelArch='src'; goRelSha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a'; \
- echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+ 'amd64') \
+ arch='linux-amd64'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-amd64.tar.gz'; \
+ sha256='2d75848ac606061efe52a8068d0e647b35ce487a15bb52272c427df485193602'; \
+ ;; \
+ 'armhf') \
+ arch='linux-armv6l'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-armv6l.tar.gz'; \
+ sha256='6d8914ddd25f85f2377c269ccfb359acf53adf71a42cdbf53434a7c76fa7a9bd'; \
+ ;; \
+ 'arm64') \
+ arch='linux-arm64'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-arm64.tar.gz'; \
+ sha256='7e18d92f61ddf480a4f9a57db09389ae7b9dadf68470d0cb9c00d734a0c57f8d'; \
+ ;; \
+ 'i386') \
+ arch='linux-386'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-386.tar.gz'; \
+ sha256='68ce979083126694ceef60233f69efe870f54af24d81a120f76265107a9e9aab'; \
+ ;; \
+ 'ppc64el') \
+ arch='linux-ppc64le'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-ppc64le.tar.gz'; \
+ sha256='4603736a158b3d8ac52b9245f39bf715936c801e05bb5ad7c44b1edd6d5ef6a2'; \
+ ;; \
+ 's390x') \
+ arch='linux-s390x'; \
+ url='https://storage.googleapis.com/golang/go1.15.linux-s390x.tar.gz'; \
+ sha256='8825f93caaf87465e32f298408c48b98d4180f3ddb885bd027f2926e711d23e8'; \
+ ;; \
+ *) \
+# https://github.com/golang/go/issues/38536#issuecomment-616897960
+ arch='src'; \
+ url='https://storage.googleapis.com/golang/go1.15.src.tar.gz'; \
+ sha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a'; \
+ echo >&2; \
+ echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; \
+ echo >&2; \
+ ;; \
esac; \
\
- url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+ wget -O go.tgz.asc "$url.asc" --progress=dot:giga; \
wget -O go.tgz "$url" --progress=dot:giga; \
- echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+ echo "$sha256 *go.tgz" | sha256sum --strict --check -; \
+ \
+# https://github.com/golang/go/issues/14739#issuecomment-324767697
+ export GNUPGHOME="$(mktemp -d)"; \
+# https://www.google.com/linuxrepositories/
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \
+ gpg --batch --verify go.tgz.asc go.tgz; \
+ rm -rf "$GNUPGHOME" go.tgz.asc; \
+ \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
-# https://github.com/golang/go/issues/38536#issuecomment-616897960
- if [ "$goRelArch" = 'src' ]; then \
+ if [ "$arch" = 'src' ]; then \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends golang-go; \
diff --git a/golang_nanoserver-1809/Dockerfile b/golang_nanoserver-1809/Dockerfile
index 7bb75ee..c73b54a 100644
--- a/golang_nanoserver-1809/Dockerfile
+++ b/golang_nanoserver-1809/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/nanoserver:1809
SHELL ["cmd", "/S", "/C"]
diff --git a/golang_windowsservercore-1809/Dockerfile b/golang_windowsservercore-1809/Dockerfile
index cc68180..c415d2f 100644
--- a/golang_windowsservercore-1809/Dockerfile
+++ b/golang_windowsservercore-1809/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/servercore:1809
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -48,7 +54,7 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
ENV GOLANG_VERSION 1.15
-RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+RUN $url = 'https://storage.googleapis.com/golang/go1.15.windows-amd64.zip'; \
Write-Host ('Downloading {0} ...' -f $url); \
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
\
diff --git a/golang_windowsservercore-ltsc2016/Dockerfile b/golang_windowsservercore-ltsc2016/Dockerfile
index 061dfe0..5ae70dc 100644
--- a/golang_windowsservercore-ltsc2016/Dockerfile
+++ b/golang_windowsservercore-ltsc2016/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
FROM mcr.microsoft.com/windows/servercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -48,7 +54,7 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
ENV GOLANG_VERSION 1.15
-RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+RUN $url = 'https://storage.googleapis.com/golang/go1.15.windows-amd64.zip'; \
Write-Host ('Downloading {0} ...' -f $url); \
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes: