diff --git a/.appveyor.yml b/.appveyor.yml index 22cb0a89..a36f5e81 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,13 +7,9 @@ environment: variant: windowsservercore-ltsc2016 - version: 1.9 variant: nanoserver-sac2016 - - version: 1.8 + - version: 1.10 variant: windowsservercore-ltsc2016 - - version: 1.8 - variant: nanoserver-sac2016 - - version: 1.10-rc - variant: windowsservercore-ltsc2016 - - version: 1.10-rc + - version: 1.10 variant: nanoserver-sac2016 install: diff --git a/.travis.yml b/.travis.yml index 44ba28f8..583d9eed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,8 @@ env: - VERSION=1.9 VARIANT=stretch - VERSION=1.9 VARIANT=alpine3.7 - VERSION=1.9 VARIANT=alpine3.6 - - VERSION=1.8 VARIANT=jessie - - VERSION=1.8 VARIANT=stretch - - VERSION=1.8 VARIANT=alpine3.6 - - VERSION=1.8 VARIANT=alpine3.5 - - VERSION=1.10-rc VARIANT=stretch - - VERSION=1.10-rc VARIANT=alpine3.7 + - VERSION=1.10 VARIANT=stretch + - VERSION=1.10 VARIANT=alpine3.7 install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/1.10-rc/windows/nanoserver-sac2016/Dockerfile b/1.10-rc/windows/nanoserver-sac2016/Dockerfile deleted file mode 100644 index 1e413760..00000000 --- a/1.10-rc/windows/nanoserver-sac2016/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM microsoft/nanoserver:sac2016 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# no Git installed (intentionally) -# -- Nano Server is "Windows Slim" - -# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows -ENV GOPATH C:\\gopath - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ - Write-Host ('Updating PATH: {0}' -f $newPath); \ -# Nano Server does not have "[Environment]::SetEnvironmentVariable()" - setx /M PATH $newPath; -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.10rc2 - -RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ - Write-Host ('Downloading {0} ...' -f $url); \ - Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ - \ - $sha256 = 'fc0160911005b725e7f5234232a27f317b50832e3eb78382a3475ec3cac5baee'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive go.zip -DestinationPath C:\; \ - \ - Write-Host 'Verifying install ("go version") ...'; \ - go version; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item go.zip -Force; \ - \ - Write-Host 'Complete.'; - -WORKDIR $GOPATH diff --git a/1.10-rc/windows/windowsservercore-1709/Dockerfile b/1.10-rc/windows/windowsservercore-1709/Dockerfile deleted file mode 100644 index c95ad9d1..00000000 --- a/1.10-rc/windows/windowsservercore-1709/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -FROM microsoft/windowsservercore:1709 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# install MinGit (especially for "go get") -# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ -# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." -# "It currently requires only ~45MB on disk." -ENV GIT_VERSION 2.11.1 -ENV GIT_TAG v${GIT_VERSION}.windows.1 -ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip -ENV GIT_DOWNLOAD_SHA256 668d16a799dd721ed126cc91bed49eb2c072ba1b25b50048280a4e2c5ed56e59 -# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) -RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ - Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ - if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item git.zip -Force; \ - \ - Write-Host 'Updating PATH ...'; \ - $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ - [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ - \ - Write-Host 'Verifying install ...'; \ - Write-Host ' git --version'; git --version; \ - \ - Write-Host 'Complete.'; - -# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows -ENV GOPATH C:\\gopath - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ - Write-Host ('Updating PATH: {0}' -f $newPath); \ - [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.10rc2 - -RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ - Write-Host ('Downloading {0} ...' -f $url); \ - Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ - \ - $sha256 = 'fc0160911005b725e7f5234232a27f317b50832e3eb78382a3475ec3cac5baee'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive go.zip -DestinationPath C:\; \ - \ - Write-Host 'Verifying install ("go version") ...'; \ - go version; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item go.zip -Force; \ - \ - Write-Host 'Complete.'; - -WORKDIR $GOPATH diff --git a/1.10-rc/windows/windowsservercore-ltsc2016/Dockerfile b/1.10-rc/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index bcf2c3d9..00000000 --- a/1.10-rc/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -FROM microsoft/windowsservercore:ltsc2016 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# install MinGit (especially for "go get") -# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ -# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." -# "It currently requires only ~45MB on disk." -ENV GIT_VERSION 2.11.1 -ENV GIT_TAG v${GIT_VERSION}.windows.1 -ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip -ENV GIT_DOWNLOAD_SHA256 668d16a799dd721ed126cc91bed49eb2c072ba1b25b50048280a4e2c5ed56e59 -# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) -RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ - Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ - if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item git.zip -Force; \ - \ - Write-Host 'Updating PATH ...'; \ - $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ - [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ - \ - Write-Host 'Verifying install ...'; \ - Write-Host ' git --version'; git --version; \ - \ - Write-Host 'Complete.'; - -# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows -ENV GOPATH C:\\gopath - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ - Write-Host ('Updating PATH: {0}' -f $newPath); \ - [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.10rc2 - -RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ - Write-Host ('Downloading {0} ...' -f $url); \ - Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ - \ - $sha256 = 'fc0160911005b725e7f5234232a27f317b50832e3eb78382a3475ec3cac5baee'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive go.zip -DestinationPath C:\; \ - \ - Write-Host 'Verifying install ("go version") ...'; \ - go version; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item go.zip -Force; \ - \ - Write-Host 'Complete.'; - -WORKDIR $GOPATH diff --git a/1.10-rc/alpine3.7/Dockerfile b/1.10/alpine3.7/Dockerfile similarity index 92% rename from 1.10-rc/alpine3.7/Dockerfile rename to 1.10/alpine3.7/Dockerfile index 8b69eb95..621995a7 100644 --- a/1.10-rc/alpine3.7/Dockerfile +++ b/1.10/alpine3.7/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.7 RUN apk add --no-cache ca-certificates -ENV GOLANG_VERSION 1.10rc2 +ENV GOLANG_VERSION 1.10 # no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) COPY *.patch /go-alpine-patches/ @@ -34,7 +34,7 @@ RUN set -eux; \ esac; \ \ wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ - echo '360bb3e627cd5308626ebe994be734da9c1c444fb420d10e79082ec110d004f6 *go.tgz' | sha256sum -c -; \ + echo 'f3de49289405fda5fd1483a8fe6bd2fa5469e005fd567df64485c4fa000c7f24 *go.tgz' | sha256sum -c -; \ tar -C /usr/local -xzf go.tgz; \ rm go.tgz; \ \ diff --git a/1.10-rc/alpine3.7/no-pic.patch b/1.10/alpine3.7/no-pic.patch similarity index 100% rename from 1.10-rc/alpine3.7/no-pic.patch rename to 1.10/alpine3.7/no-pic.patch diff --git a/1.10-rc/release-architectures b/1.10/release-architectures similarity index 100% rename from 1.10-rc/release-architectures rename to 1.10/release-architectures diff --git a/1.10-rc/stretch/Dockerfile b/1.10/stretch/Dockerfile similarity index 57% rename from 1.10-rc/stretch/Dockerfile rename to 1.10/stretch/Dockerfile index c7081bd8..377ffa50 100644 --- a/1.10-rc/stretch/Dockerfile +++ b/1.10/stretch/Dockerfile @@ -9,20 +9,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config \ && rm -rf /var/lib/apt/lists/* -ENV GOLANG_VERSION 1.10rc2 +ENV GOLANG_VERSION 1.10 RUN set -eux; \ \ # this "case" statement is generated via "update.sh" dpkgArch="$(dpkg --print-architecture)"; \ case "${dpkgArch##*-}" in \ - amd64) goRelArch='linux-amd64'; goRelSha256='6a6a4c0654bc603bcfee4d6ac34a479c260ac61b3edcc8d6773384eb0bda512e' ;; \ - armhf) goRelArch='linux-armv6l'; goRelSha256='aa145c2a9736cbcb39b9340182c319f7fc0ab3d0f2156d7dfd722572f4da519b' ;; \ - arm64) goRelArch='linux-arm64'; goRelSha256='dfa7fbe299b3766b94fb4bc231db4330b9860c44a57274f6a0d418bf00eccbc8' ;; \ - i386) goRelArch='linux-386'; goRelSha256='18832b97cdc2f21783ac60fc0136f25c19d39b7cc43459f5114dd62c0a212fe4' ;; \ - ppc64el) goRelArch='linux-ppc64le'; goRelSha256='21a6e64c83df9f124993901dda2ec608640e97a13f50cf5a58f518651b576fd8' ;; \ - s390x) goRelArch='linux-s390x'; goRelSha256='7d3aa6ec3a761b328e093b51ca14dbb8a8000685bb8957dbab44b4bb3b1d76e7' ;; \ - *) goRelArch='src'; goRelSha256='360bb3e627cd5308626ebe994be734da9c1c444fb420d10e79082ec110d004f6'; \ + amd64) goRelArch='linux-amd64'; goRelSha256='b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33' ;; \ + armhf) goRelArch='linux-armv6l'; goRelSha256='6ff665a9ab61240cf9f11a07e03e6819e452a618a32ea05bbb2c80182f838f4f' ;; \ + arm64) goRelArch='linux-arm64'; goRelSha256='efb47e5c0e020b180291379ab625c6ec1c2e9e9b289336bc7169e6aa1da43fd8' ;; \ + i386) goRelArch='linux-386'; goRelSha256='2d26a9f41fd80eeb445cc454c2ba6b3d0db2fc732c53d7d0427a9f605bfc55a1' ;; \ + ppc64el) goRelArch='linux-ppc64le'; goRelSha256='a1e22e2fbcb3e551e0bf59d0f8aeb4b3f2df86714f09d2acd260c6597c43beee' ;; \ + s390x) goRelArch='linux-s390x'; goRelSha256='71cde197e50afe17f097f81153edb450f880267699f22453272d184e0f4681d7' ;; \ + *) goRelArch='src'; goRelSha256='f3de49289405fda5fd1483a8fe6bd2fa5469e005fd567df64485c4fa000c7f24'; \ echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \ esac; \ \ diff --git a/1.8/windows/nanoserver-sac2016/Dockerfile b/1.10/windows/nanoserver-sac2016/Dockerfile similarity index 93% rename from 1.8/windows/nanoserver-sac2016/Dockerfile rename to 1.10/windows/nanoserver-sac2016/Dockerfile index 1dddea37..cb82de02 100644 --- a/1.8/windows/nanoserver-sac2016/Dockerfile +++ b/1.10/windows/nanoserver-sac2016/Dockerfile @@ -16,13 +16,13 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ setx /M PATH $newPath; # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.8.7 +ENV GOLANG_VERSION 1.10 RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = '633a28e72b95e8372e5416dd4723881d7a7109be08daf097ebce2679939f6a82'; \ + $sha256 = '210b223031c254a6eb8fa138c3782b23af710a9959d64b551fa81edd762ea167'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \ diff --git a/1.8/windows/windowsservercore-1709/Dockerfile b/1.10/windows/windowsservercore-1709/Dockerfile similarity index 96% rename from 1.8/windows/windowsservercore-1709/Dockerfile rename to 1.10/windows/windowsservercore-1709/Dockerfile index d580e49d..3f70a865 100644 --- a/1.8/windows/windowsservercore-1709/Dockerfile +++ b/1.10/windows/windowsservercore-1709/Dockerfile @@ -45,13 +45,13 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.8.7 +ENV GOLANG_VERSION 1.10 RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = '633a28e72b95e8372e5416dd4723881d7a7109be08daf097ebce2679939f6a82'; \ + $sha256 = '210b223031c254a6eb8fa138c3782b23af710a9959d64b551fa81edd762ea167'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \ diff --git a/1.8/windows/windowsservercore-ltsc2016/Dockerfile b/1.10/windows/windowsservercore-ltsc2016/Dockerfile similarity index 96% rename from 1.8/windows/windowsservercore-ltsc2016/Dockerfile rename to 1.10/windows/windowsservercore-ltsc2016/Dockerfile index 094bf5dd..5c05dfb4 100644 --- a/1.8/windows/windowsservercore-ltsc2016/Dockerfile +++ b/1.10/windows/windowsservercore-ltsc2016/Dockerfile @@ -45,13 +45,13 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.8.7 +ENV GOLANG_VERSION 1.10 RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = '633a28e72b95e8372e5416dd4723881d7a7109be08daf097ebce2679939f6a82'; \ + $sha256 = '210b223031c254a6eb8fa138c3782b23af710a9959d64b551fa81edd762ea167'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \ diff --git a/1.8/alpine3.5/Dockerfile b/1.8/alpine3.5/Dockerfile deleted file mode 100644 index e5ccaa97..00000000 --- a/1.8/alpine3.5/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -FROM alpine:3.5 - -RUN apk add --no-cache ca-certificates - -ENV GOLANG_VERSION 1.8.7 - -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) -COPY *.patch /go-alpine-patches/ - -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 '5911e751807eebbc1980dad4305ef5492b96d6cd720bf93cbcefa86e1c195f9e *go.tgz' | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - cd /usr/local/go/src; \ - for p in /go-alpine-patches/*.patch; do \ - [ -f "$p" ] || continue; \ - patch -p2 -i "$p"; \ - done; \ - ./make.bash; \ - \ - rm -rf /go-alpine-patches; \ - 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 - -COPY go-wrapper /usr/local/bin/ diff --git a/1.8/alpine3.5/go-wrapper b/1.8/alpine3.5/go-wrapper deleted file mode 100755 index f722bad1..00000000 --- a/1.8/alpine3.5/go-wrapper +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac diff --git a/1.8/alpine3.5/no-pic.patch b/1.8/alpine3.5/no-pic.patch deleted file mode 100644 index 9da79921..00000000 --- a/1.8/alpine3.5/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 14f4fa9..5599307 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1272,6 +1272,11 @@ func hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if l.Debugvlog != 0 { - l.Logf("%5.2f host link:", obj.Cputime()) - for _, v := range argv { diff --git a/1.8/alpine3.6/Dockerfile b/1.8/alpine3.6/Dockerfile deleted file mode 100644 index 25438332..00000000 --- a/1.8/alpine3.6/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -FROM alpine:3.6 - -RUN apk add --no-cache ca-certificates - -ENV GOLANG_VERSION 1.8.7 - -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) -COPY *.patch /go-alpine-patches/ - -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 '5911e751807eebbc1980dad4305ef5492b96d6cd720bf93cbcefa86e1c195f9e *go.tgz' | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - cd /usr/local/go/src; \ - for p in /go-alpine-patches/*.patch; do \ - [ -f "$p" ] || continue; \ - patch -p2 -i "$p"; \ - done; \ - ./make.bash; \ - \ - rm -rf /go-alpine-patches; \ - 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 - -COPY go-wrapper /usr/local/bin/ diff --git a/1.8/alpine3.6/go-wrapper b/1.8/alpine3.6/go-wrapper deleted file mode 100755 index f722bad1..00000000 --- a/1.8/alpine3.6/go-wrapper +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac diff --git a/1.8/alpine3.6/make-sure-R0-is-zero-before-main-on-ppc64le.patch b/1.8/alpine3.6/make-sure-R0-is-zero-before-main-on-ppc64le.patch deleted file mode 100644 index 88f88771..00000000 --- a/1.8/alpine3.6/make-sure-R0-is-zero-before-main-on-ppc64le.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9aea0e89b6df032c29d0add8d69ba2c95f1106d9 Mon Sep 17 00:00:00 2001 -From: Carlos Eduardo Seo -Date: Thu, 10 Aug 2017 14:48:36 -0300 -Subject: [PATCH] runtime: make sure R0 is zero before _main on ppc64le - -_main has an early check to verify if a binary is statically or dynamically -linked that depends on R0 being zero. R0 is not guaranteed to be zero at that -point and this was breaking Go on Alpine for ppc64le. - -Change-Id: I4a1059ff7fd3db6fc489e7dcfe631c1814dd965b -Reviewed-on: https://go-review.googlesource.com/54730 -Run-TryBot: Lynn Boger -Reviewed-by: Lynn Boger ---- - src/runtime/rt0_linux_ppc64le.s | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/runtime/rt0_linux_ppc64le.s b/src/runtime/rt0_linux_ppc64le.s -index 134858bff8..73b9ae392d 100644 ---- a/src/runtime/rt0_linux_ppc64le.s -+++ b/src/runtime/rt0_linux_ppc64le.s -@@ -2,6 +2,7 @@ - #include "textflag.h" - - TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0 -+ XOR R0, R0 // Make sure R0 is zero before _main - BR _main<>(SB) - - TEXT _rt0_ppc64le_linux_lib(SB),NOSPLIT,$-8 --- -2.14.1 - diff --git a/1.8/alpine3.6/no-pic.patch b/1.8/alpine3.6/no-pic.patch deleted file mode 100644 index 9da79921..00000000 --- a/1.8/alpine3.6/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 14f4fa9..5599307 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1272,6 +1272,11 @@ func hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if l.Debugvlog != 0 { - l.Logf("%5.2f host link:", obj.Cputime()) - for _, v := range argv { diff --git a/1.8/jessie/Dockerfile b/1.8/jessie/Dockerfile deleted file mode 100644 index 6ed524b2..00000000 --- a/1.8/jessie/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM buildpack-deps:jessie-scm - -# gcc for cgo -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - gcc \ - libc6-dev \ - make \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* - -ENV GOLANG_VERSION 1.8.7 - -RUN set -eux; \ - \ -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64) goRelArch='linux-amd64'; goRelSha256='de32e8db3dc030e1448a6ca52d87a1e04ad31c6b212007616cfcc87beb0e4d60' ;; \ - armhf) goRelArch='linux-armv6l'; goRelSha256='7aa455a8ddec569e778b23166102bb26f1bdb3ad5feec15b688654a10a9d3d2a' ;; \ - arm64) goRelArch='linux-arm64'; goRelSha256='804c2e73eca5ce309f2947aaf437fce9f67463b4fb9484f47c95b632d4eeabf6' ;; \ - i386) goRelArch='linux-386'; goRelSha256='3afab0048a44f66c4132f1fe26d3301fa4c51b47e7176c2d3f311c49d9aa74d6' ;; \ - ppc64el) goRelArch='linux-ppc64le'; goRelSha256='588527ed410653318188b45eb27de098bdb12f95060a648e14587b28bf1761d9' ;; \ - s390x) goRelArch='linux-s390x'; goRelSha256='a4dc8ceec71e6f22c10e5781a89dec91e9a1819f56822ac38a54de1700df1226' ;; \ - *) goRelArch='src'; goRelSha256='5911e751807eebbc1980dad4305ef5492b96d6cd720bf93cbcefa86e1c195f9e'; \ - 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 "$url"; \ - echo "${goRelSha256} *go.tgz" | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - if [ "$goRelArch" = 'src' ]; then \ - echo >&2; \ - echo >&2 'error: UNIMPLEMENTED'; \ - echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \ - echo >&2; \ - exit 1; \ - fi; \ - \ - 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 - -COPY go-wrapper /usr/local/bin/ diff --git a/1.8/jessie/go-wrapper b/1.8/jessie/go-wrapper deleted file mode 100755 index f722bad1..00000000 --- a/1.8/jessie/go-wrapper +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac diff --git a/1.8/onbuild/Dockerfile b/1.8/onbuild/Dockerfile deleted file mode 100644 index a4355c64..00000000 --- a/1.8/onbuild/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM golang:1.8 - -RUN mkdir -p /go/src/app -WORKDIR /go/src/app - -# this will ideally be built by the ONBUILD below ;) -CMD ["go-wrapper", "run"] - -ONBUILD COPY . /go/src/app -ONBUILD RUN go-wrapper download -ONBUILD RUN go-wrapper install diff --git a/1.8/release-architectures b/1.8/release-architectures deleted file mode 100644 index 6b7fa2c8..00000000 --- a/1.8/release-architectures +++ /dev/null @@ -1,9 +0,0 @@ -# see https://golang.org/dl/ - -# bashbrew-arch dpkg-arch golang-release-arch -amd64 amd64 amd64 -arm32v7 armhf armv6l -arm64v8 arm64 arm64 -i386 i386 386 -ppc64le ppc64el ppc64le -s390x s390x s390x diff --git a/1.8/stretch/Dockerfile b/1.8/stretch/Dockerfile deleted file mode 100644 index ed978730..00000000 --- a/1.8/stretch/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM buildpack-deps:stretch-scm - -# gcc for cgo -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - gcc \ - libc6-dev \ - make \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* - -ENV GOLANG_VERSION 1.8.7 - -RUN set -eux; \ - \ -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64) goRelArch='linux-amd64'; goRelSha256='de32e8db3dc030e1448a6ca52d87a1e04ad31c6b212007616cfcc87beb0e4d60' ;; \ - armhf) goRelArch='linux-armv6l'; goRelSha256='7aa455a8ddec569e778b23166102bb26f1bdb3ad5feec15b688654a10a9d3d2a' ;; \ - arm64) goRelArch='linux-arm64'; goRelSha256='804c2e73eca5ce309f2947aaf437fce9f67463b4fb9484f47c95b632d4eeabf6' ;; \ - i386) goRelArch='linux-386'; goRelSha256='3afab0048a44f66c4132f1fe26d3301fa4c51b47e7176c2d3f311c49d9aa74d6' ;; \ - ppc64el) goRelArch='linux-ppc64le'; goRelSha256='588527ed410653318188b45eb27de098bdb12f95060a648e14587b28bf1761d9' ;; \ - s390x) goRelArch='linux-s390x'; goRelSha256='a4dc8ceec71e6f22c10e5781a89dec91e9a1819f56822ac38a54de1700df1226' ;; \ - *) goRelArch='src'; goRelSha256='5911e751807eebbc1980dad4305ef5492b96d6cd720bf93cbcefa86e1c195f9e'; \ - 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 "$url"; \ - echo "${goRelSha256} *go.tgz" | sha256sum -c -; \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ - if [ "$goRelArch" = 'src' ]; then \ - echo >&2; \ - echo >&2 'error: UNIMPLEMENTED'; \ - echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \ - echo >&2; \ - exit 1; \ - fi; \ - \ - 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 - -COPY go-wrapper /usr/local/bin/ diff --git a/1.8/stretch/go-wrapper b/1.8/stretch/go-wrapper deleted file mode 100755 index f722bad1..00000000 --- a/1.8/stretch/go-wrapper +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 99e7f7ab..2e33f6c6 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,17 +2,15 @@ set -Eeuo pipefail declare -A aliases=( - [1.9]='1 latest' - [1.10-rc]='rc' + [1.10]='1 latest' + [1.11-rc]='rc' ) defaultDebianSuite='stretch' declare -A debianSuite=( - [1.8]='jessie' ) defaultAlpineVersion='3.7' declare -A alpineVersion=( - [1.8]='3.5' [1.9]='3.6' ) @@ -74,7 +72,7 @@ for version in "${versions[@]}"; do ) for v in \ - stretch jessie wheezy alpine3.{7,6,5,4} onbuild \ + stretch alpine3.{7,6} \ windows/windowsservercore-{ltsc2016,1709} \ windows/nanoserver-{sac2016,1709} \ ; do @@ -88,12 +86,6 @@ for version in "${versions[@]}"; do commit="$(dirCommit "$dir")" fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "GOLANG_VERSION" { print $3; exit }')" - if [ -z "$fullVersion" ]; then - # for onbuild, since it does not contain GOLANG_VERSION - suiteCommit="$(dirCommit "$version/$versionSuite")" - fullVersion="$(git show "$suiteCommit":"$version/$versionSuite/Dockerfile" | awk '$1 == "ENV" && $2 == "GOLANG_VERSION" { print $3; exit }')" - fi - [[ "$fullVersion" == *.*[^0-9]* ]] || fullVersion+='.0' baseAliases=( $fullVersion "${versionAliases[@]}" ) @@ -106,7 +98,6 @@ for version in "${versions[@]}"; do fi case "$v" in - onbuild) variantArches="$(variantArches "$version" "$versionSuite" )";; alpine*) variantArches="$(parentArches "$version" "$v")" ;; windows/*) variantArches='windows-amd64' ;; *) variantArches="$(variantArches "$version" "$v")" ;; diff --git a/update.sh b/update.sh index 7fb7efcf..4c5b158c 100755 --- a/update.sh +++ b/update.sh @@ -84,8 +84,8 @@ for version in "${versions[@]}"; do windowsSha256="$(curl -fsSL "https://storage.googleapis.com/golang/go${fullVersion}.windows-amd64.zip.sha256")" for variant in \ - alpine3.{4,5,6,7} \ - stretch jessie wheezy \ + alpine3.{6,7} \ + stretch \ ; do if [ -d "$version/$variant" ]; then tag="$variant" @@ -102,7 +102,7 @@ for version in "${versions[@]}"; do "Dockerfile-${template}.template" > "$version/$variant/Dockerfile" case "$version" in - 1.8|1.9) + 1.9) # our "go-wrapper" script is officially deprecated in 1.10+ cp -a go-wrapper "$version/$variant/" cat >> "$version/$variant/Dockerfile" <<-'EODF'