Skip to content

Backfill 1.12.11 and 1.13.2 temporarily #309

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 1 commit into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ image: Visual Studio 2017

environment:
matrix:
- version: 1.13.2
variant: windowsservercore-ltsc2016
- version: 1.13
variant: windowsservercore-ltsc2016
- version: 1.12.11
variant: windowsservercore-ltsc2016
- version: 1.12
variant: windowsservercore-ltsc2016

Expand Down
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ services: docker

matrix:
include:
- os: windows
dist: 1803-containers
env: VERSION=1.13.2 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=1.13.2 VARIANT=buster
- os: linux
env: VERSION=1.13.2 VARIANT=stretch
- os: linux
env: VERSION=1.13.2 VARIANT=alpine3.10
- os: windows
dist: 1803-containers
env: VERSION=1.13 VARIANT=windows/windowsservercore-1803
Expand All @@ -12,6 +21,17 @@ matrix:
env: VERSION=1.13 VARIANT=stretch
- os: linux
env: VERSION=1.13 VARIANT=alpine3.10
- os: windows
dist: 1803-containers
env: VERSION=1.12.11 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=1.12.11 VARIANT=buster
- os: linux
env: VERSION=1.12.11 VARIANT=stretch
- os: linux
env: VERSION=1.12.11 VARIANT=alpine3.10
- os: linux
env: VERSION=1.12.11 VARIANT=alpine3.9
- os: windows
dist: 1803-containers
env: VERSION=1.12 VARIANT=windows/windowsservercore-1803
Expand Down
63 changes: 63 additions & 0 deletions 1.12.11/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM alpine:3.10

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.12.11

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 'fcf58935236802929f5726e96cd1d900853b377bec2c51b2e37219c658a4950f *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
63 changes: 63 additions & 0 deletions 1.12.11/alpine3.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.12.11

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 'fcf58935236802929f5726e96cd1d900853b377bec2c51b2e37219c658a4950f *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
50 changes: 50 additions & 0 deletions 1.12.11/buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM buildpack-deps:buster-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.12.11

RUN set -eux; \
\
# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) goRelArch='linux-amd64'; goRelSha256='2c5960292da8b747d83f171a28a04116b2977e809169c344268c893e4cf0a857' ;; \
armhf) goRelArch='linux-armv6l'; goRelSha256='895766c9c1d1a32e9e0e7ea2f9fac6f33df0397954564c05b56ecdc58605fd1e' ;; \
arm64) goRelArch='linux-arm64'; goRelSha256='a05361badb95f6cc5724e32f59b0f33048dfca63b539cf2bd8ab77fa4f2ba923' ;; \
i386) goRelArch='linux-386'; goRelSha256='9d979c489471c5ec9b9cd6b0922f061b2dca7b801effc39d7826a1255e8221c9' ;; \
ppc64el) goRelArch='linux-ppc64le'; goRelSha256='8f962f84bd36f5caad78710b32e074406d12e864e334bf6c8820836dbd1b6409' ;; \
s390x) goRelArch='linux-s390x'; goRelSha256='faa9de31cc41c0ecb79382569f1269758a7e51ca526aaf849d7189da6e28f716' ;; \
*) goRelArch='src'; goRelSha256='fcf58935236802929f5726e96cd1d900853b377bec2c51b2e37219c658a4950f'; \
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
9 changes: 9 additions & 0 deletions 1.12.11/release-architectures
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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
50 changes: 50 additions & 0 deletions 1.12.11/stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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.12.11

RUN set -eux; \
\
# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) goRelArch='linux-amd64'; goRelSha256='2c5960292da8b747d83f171a28a04116b2977e809169c344268c893e4cf0a857' ;; \
armhf) goRelArch='linux-armv6l'; goRelSha256='895766c9c1d1a32e9e0e7ea2f9fac6f33df0397954564c05b56ecdc58605fd1e' ;; \
arm64) goRelArch='linux-arm64'; goRelSha256='a05361badb95f6cc5724e32f59b0f33048dfca63b539cf2bd8ab77fa4f2ba923' ;; \
i386) goRelArch='linux-386'; goRelSha256='9d979c489471c5ec9b9cd6b0922f061b2dca7b801effc39d7826a1255e8221c9' ;; \
ppc64el) goRelArch='linux-ppc64le'; goRelSha256='8f962f84bd36f5caad78710b32e074406d12e864e334bf6c8820836dbd1b6409' ;; \
s390x) goRelArch='linux-s390x'; goRelSha256='faa9de31cc41c0ecb79382569f1269758a7e51ca526aaf849d7189da6e28f716' ;; \
*) goRelArch='src'; goRelSha256='fcf58935236802929f5726e96cd1d900853b377bec2c51b2e37219c658a4950f'; \
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
22 changes: 22 additions & 0 deletions 1.12.11/windows/nanoserver-1803/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/windows/nanoserver:1803

SHELL ["cmd", "/S", "/C"]

# 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
USER ContainerAdministrator
RUN setx /m PATH "%GOPATH%\bin;C:\go\bin;%PATH%"
USER ContainerUser
# doing this first to share cache across versions more aggressively

ENV GOLANG_VERSION 1.12.11

COPY --from=golang:1.12.11-windowsservercore-1803 C:\\go C:\\go
RUN go version

WORKDIR $GOPATH
22 changes: 22 additions & 0 deletions 1.12.11/windows/nanoserver-1809/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/windows/nanoserver:1809

SHELL ["cmd", "/S", "/C"]

# 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
USER ContainerAdministrator
RUN setx /m PATH "%GOPATH%\bin;C:\go\bin;%PATH%"
USER ContainerUser
# doing this first to share cache across versions more aggressively

ENV GOLANG_VERSION 1.12.11

COPY --from=golang:1.12.11-windowsservercore-1809 C:\\go C:\\go
RUN go version

WORKDIR $GOPATH
Loading