Skip to content

Add alpine 3.10 #285

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
Jun 20, 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
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ matrix:
env: VERSION=1.12 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=1.12 VARIANT=stretch
- os: linux
env: VERSION=1.12 VARIANT=alpine3.10
- os: linux
env: VERSION=1.12 VARIANT=alpine3.9
- os: windows
Expand All @@ -16,9 +18,9 @@ matrix:
- os: linux
env: VERSION=1.11 VARIANT=stretch
- os: linux
env: VERSION=1.11 VARIANT=alpine3.9
env: VERSION=1.11 VARIANT=alpine3.10
- os: linux
env: VERSION=1.11 VARIANT=alpine3.8
env: VERSION=1.11 VARIANT=alpine3.9

install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
Expand Down
2 changes: 1 addition & 1 deletion 1.11/alpine3.8/Dockerfile → 1.11/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.8
FROM alpine:3.10

RUN apk add --no-cache \
ca-certificates
Expand Down
63 changes: 63 additions & 0 deletions 1.12/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.6

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 'c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca *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
4 changes: 2 additions & 2 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare -A aliases=(
defaultDebianSuite='stretch'
declare -A debianSuite=(
)
defaultAlpineVersion='3.9'
defaultAlpineVersion='3.10'
declare -A alpineVersion=(
#[1.9]='3.7'
)
Expand Down Expand Up @@ -72,7 +72,7 @@ for version in "${versions[@]}"; do
)

for v in \
stretch alpine{3.9,3.8} \
stretch alpine{3.10,3.9} \
windows/windowsservercore-{ltsc2016,1803,1809} \
windows/nanoserver-{1803,1809} \
; do
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
alpine{3.8,3.9} \
alpine{3.9,3.10} \
stretch \
; do
if [ -d "$version/$variant" ]; then
Expand Down