From 7967b894abc1ff563e2d854afd9beabd37def26c Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Thu, 31 Jan 2019 22:19:02 +0800 Subject: [PATCH 1/2] Add Alpine3.9 Signed-off-by: Jintao Zhang --- .travis.yml | 6 ++++ 1.10/alpine3.9/Dockerfile | 63 ++++++++++++++++++++++++++++++++++++ 1.11/alpine3.9/Dockerfile | 63 ++++++++++++++++++++++++++++++++++++ 1.12-rc/alpine3.9/Dockerfile | 63 ++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 1.10/alpine3.9/Dockerfile create mode 100644 1.11/alpine3.9/Dockerfile create mode 100644 1.12-rc/alpine3.9/Dockerfile diff --git a/.travis.yml b/.travis.yml index 4d353fce..d1a7d42b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ matrix: env: VERSION=1.12-rc VARIANT=windows/windowsservercore-1803 - os: linux env: VERSION=1.12-rc VARIANT=stretch + - os: linux + env: VERSION=1.12-rc VARIANT=alpine3.9 - os: linux env: VERSION=1.12-rc VARIANT=alpine3.8 - os: windows @@ -15,6 +17,8 @@ matrix: env: VERSION=1.11 VARIANT=windows/windowsservercore-1803 - os: linux env: VERSION=1.11 VARIANT=stretch + - os: linux + env: VERSION=1.11 VARIANT=alpine3.9 - os: linux env: VERSION=1.11 VARIANT=alpine3.8 - os: linux @@ -24,6 +28,8 @@ matrix: env: VERSION=1.10 VARIANT=windows/windowsservercore-1803 - os: linux env: VERSION=1.10 VARIANT=stretch + - os: linux + env: VERSION=1.10 VARIANT=alpine3.9 - os: linux env: VERSION=1.10 VARIANT=alpine3.8 - os: linux diff --git a/1.10/alpine3.9/Dockerfile b/1.10/alpine3.9/Dockerfile new file mode 100644 index 00000000..4fd34216 --- /dev/null +++ b/1.10/alpine3.9/Dockerfile @@ -0,0 +1,63 @@ +FROM alpine:3.9 + +RUN apk add --no-cache \ + ca-certificates + +# set up nsswitch.conf for Go's "netgo" implementation +# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 +# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf +RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf + +ENV GOLANG_VERSION 1.10.8 + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + bash \ + gcc \ + musl-dev \ + openssl \ + go \ + ; \ + export \ +# set GOROOT_BOOTSTRAP such that we can actually build Go + GOROOT_BOOTSTRAP="$(go env GOROOT)" \ +# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch +# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386) + GOOS="$(go env GOOS)" \ + GOARCH="$(go env GOARCH)" \ + GOHOSTOS="$(go env GOHOSTOS)" \ + GOHOSTARCH="$(go env GOHOSTARCH)" \ + ; \ +# also explicitly set GO386 and GOARM if appropriate +# https://github.com/docker-library/golang/issues/184 + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + armhf) export GOARM='6' ;; \ + x86) export GO386='387' ;; \ + esac; \ + \ + wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ + echo '6faf74046b5e24c2c0b46e78571cca4d65e1b89819da1089e53ea57539c63491 *go.tgz' | sha256sum -c -; \ + tar -C /usr/local -xzf go.tgz; \ + rm go.tgz; \ + \ + cd /usr/local/go/src; \ + ./make.bash; \ + \ + rm -rf \ +# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125 + /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 \ + ; \ + 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 + +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH diff --git a/1.11/alpine3.9/Dockerfile b/1.11/alpine3.9/Dockerfile new file mode 100644 index 00000000..d6a56cb8 --- /dev/null +++ b/1.11/alpine3.9/Dockerfile @@ -0,0 +1,63 @@ +FROM alpine:3.9 + +RUN apk add --no-cache \ + ca-certificates + +# set up nsswitch.conf for Go's "netgo" implementation +# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 +# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf +RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf + +ENV GOLANG_VERSION 1.11.5 + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + bash \ + gcc \ + musl-dev \ + openssl \ + go \ + ; \ + export \ +# set GOROOT_BOOTSTRAP such that we can actually build Go + GOROOT_BOOTSTRAP="$(go env GOROOT)" \ +# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch +# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386) + GOOS="$(go env GOOS)" \ + GOARCH="$(go env GOARCH)" \ + GOHOSTOS="$(go env GOHOSTOS)" \ + GOHOSTARCH="$(go env GOHOSTARCH)" \ + ; \ +# also explicitly set GO386 and GOARM if appropriate +# https://github.com/docker-library/golang/issues/184 + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + armhf) export GOARM='6' ;; \ + x86) export GO386='387' ;; \ + esac; \ + \ + wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ + echo 'bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e *go.tgz' | sha256sum -c -; \ + tar -C /usr/local -xzf go.tgz; \ + rm go.tgz; \ + \ + cd /usr/local/go/src; \ + ./make.bash; \ + \ + rm -rf \ +# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125 + /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 \ + ; \ + 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 + +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH diff --git a/1.12-rc/alpine3.9/Dockerfile b/1.12-rc/alpine3.9/Dockerfile new file mode 100644 index 00000000..7adff4a7 --- /dev/null +++ b/1.12-rc/alpine3.9/Dockerfile @@ -0,0 +1,63 @@ +FROM alpine:3.9 + +RUN apk add --no-cache \ + ca-certificates + +# set up nsswitch.conf for Go's "netgo" implementation +# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 +# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf +RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf + +ENV GOLANG_VERSION 1.12beta2 + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + bash \ + gcc \ + musl-dev \ + openssl \ + go \ + ; \ + export \ +# set GOROOT_BOOTSTRAP such that we can actually build Go + GOROOT_BOOTSTRAP="$(go env GOROOT)" \ +# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch +# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386) + GOOS="$(go env GOOS)" \ + GOARCH="$(go env GOARCH)" \ + GOHOSTOS="$(go env GOHOSTOS)" \ + GOHOSTARCH="$(go env GOHOSTARCH)" \ + ; \ +# also explicitly set GO386 and GOARM if appropriate +# https://github.com/docker-library/golang/issues/184 + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + armhf) export GOARM='6' ;; \ + x86) export GO386='387' ;; \ + esac; \ + \ + wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ + echo 'fd3f4e1860ac59d647c22a2c1589fcf4a96c02bbbfef1ca1ea44bc25cf62a490 *go.tgz' | sha256sum -c -; \ + tar -C /usr/local -xzf go.tgz; \ + rm go.tgz; \ + \ + cd /usr/local/go/src; \ + ./make.bash; \ + \ + rm -rf \ +# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125 + /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 \ + ; \ + 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 + +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH From c58a1077faf66bd47ea9c0f3680b252572f26bb3 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 1 Feb 2019 13:23:29 -0800 Subject: [PATCH 2/2] Also remove Alpine 3.7 variants and make 3.9 the default --- .travis.yml | 4 --- 1.10/alpine3.7/Dockerfile | 63 ----------------------------------- 1.11/alpine3.7/Dockerfile | 63 ----------------------------------- generate-stackbrew-library.sh | 4 +-- update.sh | 2 +- 5 files changed, 3 insertions(+), 133 deletions(-) delete mode 100644 1.10/alpine3.7/Dockerfile delete mode 100644 1.11/alpine3.7/Dockerfile diff --git a/.travis.yml b/.travis.yml index d1a7d42b..903a5e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,6 @@ matrix: env: VERSION=1.11 VARIANT=alpine3.9 - os: linux env: VERSION=1.11 VARIANT=alpine3.8 - - os: linux - env: VERSION=1.11 VARIANT=alpine3.7 - os: windows dist: 1803-containers env: VERSION=1.10 VARIANT=windows/windowsservercore-1803 @@ -32,8 +30,6 @@ matrix: env: VERSION=1.10 VARIANT=alpine3.9 - os: linux env: VERSION=1.10 VARIANT=alpine3.8 - - os: linux - env: VERSION=1.10 VARIANT=alpine3.7 install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/1.10/alpine3.7/Dockerfile b/1.10/alpine3.7/Dockerfile deleted file mode 100644 index 4094a255..00000000 --- a/1.10/alpine3.7/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -FROM alpine:3.7 - -RUN apk add --no-cache \ - ca-certificates - -# set up nsswitch.conf for Go's "netgo" implementation -# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 -# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf -RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf - -ENV GOLANG_VERSION 1.10.8 - -RUN set -eux; \ - apk add --no-cache --virtual .build-deps \ - bash \ - gcc \ - musl-dev \ - openssl \ - go \ - ; \ - export \ -# set GOROOT_BOOTSTRAP such that we can actually build Go - GOROOT_BOOTSTRAP="$(go env GOROOT)" \ -# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch -# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386) - GOOS="$(go env GOOS)" \ - GOARCH="$(go env GOARCH)" \ - GOHOSTOS="$(go env GOHOSTOS)" \ - GOHOSTARCH="$(go env GOHOSTARCH)" \ - ; \ -# also explicitly set GO386 and GOARM if appropriate -# https://github.com/docker-library/golang/issues/184 - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - armhf) export GOARM='6' ;; \ - x86) export GO386='387' ;; \ - esac; \ - \ - wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ - echo '6faf74046b5e24c2c0b46e78571cca4d65e1b89819da1089e53ea57539c63491 *go.tgz' | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - cd /usr/local/go/src; \ - ./make.bash; \ - \ - rm -rf \ -# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125 - /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 \ - ; \ - 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 - -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" -WORKDIR $GOPATH diff --git a/1.11/alpine3.7/Dockerfile b/1.11/alpine3.7/Dockerfile deleted file mode 100644 index a37d3189..00000000 --- a/1.11/alpine3.7/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -FROM alpine:3.7 - -RUN apk add --no-cache \ - ca-certificates - -# set up nsswitch.conf for Go's "netgo" implementation -# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 -# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf -RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf - -ENV GOLANG_VERSION 1.11.5 - -RUN set -eux; \ - apk add --no-cache --virtual .build-deps \ - bash \ - gcc \ - musl-dev \ - openssl \ - go \ - ; \ - export \ -# set GOROOT_BOOTSTRAP such that we can actually build Go - GOROOT_BOOTSTRAP="$(go env GOROOT)" \ -# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch -# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386) - GOOS="$(go env GOOS)" \ - GOARCH="$(go env GOARCH)" \ - GOHOSTOS="$(go env GOHOSTOS)" \ - GOHOSTARCH="$(go env GOHOSTARCH)" \ - ; \ -# also explicitly set GO386 and GOARM if appropriate -# https://github.com/docker-library/golang/issues/184 - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - armhf) export GOARM='6' ;; \ - x86) export GO386='387' ;; \ - esac; \ - \ - wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ - echo 'bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e *go.tgz' | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - cd /usr/local/go/src; \ - ./make.bash; \ - \ - rm -rf \ -# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125 - /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 \ - ; \ - 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 - -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" -WORKDIR $GOPATH diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 0f942563..9a058cf0 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -9,7 +9,7 @@ declare -A aliases=( defaultDebianSuite='stretch' declare -A debianSuite=( ) -defaultAlpineVersion='3.8' +defaultAlpineVersion='3.9' declare -A alpineVersion=( #[1.9]='3.7' ) @@ -72,7 +72,7 @@ for version in "${versions[@]}"; do ) for v in \ - stretch alpine3.{8,7} \ + stretch alpine{3.9,3.8} \ windows/windowsservercore-{ltsc2016,1709,1803,1809} \ windows/nanoserver-{sac2016,1709,1803,1809} \ ; do diff --git a/update.sh b/update.sh index f4c8a766..f1183441 100755 --- a/update.sh +++ b/update.sh @@ -84,7 +84,7 @@ for version in "${versions[@]}"; do windowsSha256="$(curl -fsSL "https://storage.googleapis.com/golang/go${fullVersion}.windows-amd64.zip.sha256")" for variant in \ - alpine3.{7,8} \ + alpine{3.8,3.9} \ stretch \ ; do if [ -d "$version/$variant" ]; then