Skip to content

Commit 3f57232

Browse files
authored
Merge pull request #313 from sapk-fork/alpine-3-11
Add alpine:3.11
2 parents 4ea106f + 4bf3297 commit 3f57232

File tree

6 files changed

+73
-8
lines changed

6 files changed

+73
-8
lines changed

.travis.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ matrix:
66
- os: linux
77
env: VERSION=1.14-rc VARIANT=buster
88
- os: linux
9-
env: VERSION=1.14-rc VARIANT=alpine3.10
9+
env: VERSION=1.14-rc VARIANT=alpine3.11
1010
- os: linux
1111
env: VERSION=1.13 VARIANT=buster
1212
- os: linux
1313
env: VERSION=1.13 VARIANT=stretch
14+
- os: linux
15+
env: VERSION=1.13 VARIANT=alpine3.11
1416
- os: linux
1517
env: VERSION=1.13 VARIANT=alpine3.10
1618
- os: linux
1719
env: VERSION=1.12 VARIANT=buster
1820
- os: linux
1921
env: VERSION=1.12 VARIANT=stretch
2022
- os: linux
21-
env: VERSION=1.12 VARIANT=alpine3.10
23+
env: VERSION=1.12 VARIANT=alpine3.11
2224
- os: linux
23-
env: VERSION=1.12 VARIANT=alpine3.9
25+
env: VERSION=1.12 VARIANT=alpine3.10
2426

2527
install:
2628
- git clone https://github.com/docker-library/official-images.git ~/official-images

1.12/alpine3.9/Dockerfile renamed to 1.12/alpine3.11/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.9
1+
FROM alpine:3.11
22

33
RUN apk add --no-cache \
44
ca-certificates

1.13/alpine3.11/Dockerfile

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM alpine:3.11
2+
3+
RUN apk add --no-cache \
4+
ca-certificates
5+
6+
# set up nsswitch.conf for Go's "netgo" implementation
7+
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
8+
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
9+
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
10+
11+
ENV GOLANG_VERSION 1.13.5
12+
13+
RUN set -eux; \
14+
apk add --no-cache --virtual .build-deps \
15+
bash \
16+
gcc \
17+
musl-dev \
18+
openssl \
19+
go \
20+
; \
21+
export \
22+
# set GOROOT_BOOTSTRAP such that we can actually build Go
23+
GOROOT_BOOTSTRAP="$(go env GOROOT)" \
24+
# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch
25+
# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386)
26+
GOOS="$(go env GOOS)" \
27+
GOARCH="$(go env GOARCH)" \
28+
GOHOSTOS="$(go env GOHOSTOS)" \
29+
GOHOSTARCH="$(go env GOHOSTARCH)" \
30+
; \
31+
# also explicitly set GO386 and GOARM if appropriate
32+
# https://github.com/docker-library/golang/issues/184
33+
apkArch="$(apk --print-arch)"; \
34+
case "$apkArch" in \
35+
armhf) export GOARM='6' ;; \
36+
x86) export GO386='387' ;; \
37+
esac; \
38+
\
39+
wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
40+
echo '27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff *go.tgz' | sha256sum -c -; \
41+
tar -C /usr/local -xzf go.tgz; \
42+
rm go.tgz; \
43+
\
44+
cd /usr/local/go/src; \
45+
./make.bash; \
46+
\
47+
rm -rf \
48+
# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
49+
/usr/local/go/pkg/bootstrap \
50+
# https://golang.org/cl/82095
51+
# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
52+
/usr/local/go/pkg/obj \
53+
; \
54+
apk del .build-deps; \
55+
\
56+
export PATH="/usr/local/go/bin:$PATH"; \
57+
go version
58+
59+
ENV GOPATH /go
60+
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
61+
62+
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
63+
WORKDIR $GOPATH

1.14-rc/alpine3.10/Dockerfile renamed to 1.14-rc/alpine3.11/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.10
1+
FROM alpine:3.11
22

33
RUN apk add --no-cache \
44
ca-certificates

generate-stackbrew-library.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defaultDebianSuite='buster'
1010
declare -A debianSuite=(
1111
#[1.13-rc]='buster'
1212
)
13-
defaultAlpineVersion='3.10'
13+
defaultAlpineVersion='3.11'
1414
declare -A alpineVersion=(
1515
#[1.9]='3.7'
1616
)
@@ -77,7 +77,7 @@ for version in "${versions[@]}"; do
7777
)
7878

7979
for v in \
80-
buster stretch alpine{3.10,3.9} \
80+
buster stretch alpine{3.11,3.10} \
8181
windows/windowsservercore-{ltsc2016,1809} \
8282
windows/nanoserver-1809 \
8383
; do

update.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ for version in "${versions[@]}"; do
8484
windowsSha256="$(curl -fsSL "https://storage.googleapis.com/golang/go${fullVersion}.windows-amd64.zip.sha256")"
8585

8686
for variant in \
87-
alpine{3.9,3.10} \
87+
alpine{3.10,3.11} \
8888
stretch buster \
8989
; do
9090
if [ -d "$version/$variant" ]; then

0 commit comments

Comments
 (0)