Skip to content

Commit a3e99c2

Browse files
committed
add alpine 3.10
Signed-off-by: Antoine GIRARD <[email protected]>
1 parent 0c577f7 commit a3e99c2

File tree

5 files changed

+71
-6
lines changed

5 files changed

+71
-6
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ matrix:
88
env: VERSION=1.12 VARIANT=windows/windowsservercore-1803
99
- os: linux
1010
env: VERSION=1.12 VARIANT=stretch
11+
- os: linux
12+
env: VERSION=1.12 VARIANT=alpine3.10
1113
- os: linux
1214
env: VERSION=1.12 VARIANT=alpine3.9
1315
- os: windows
@@ -16,9 +18,9 @@ matrix:
1618
- os: linux
1719
env: VERSION=1.11 VARIANT=stretch
1820
- os: linux
19-
env: VERSION=1.11 VARIANT=alpine3.9
21+
env: VERSION=1.11 VARIANT=alpine3.10
2022
- os: linux
21-
env: VERSION=1.11 VARIANT=alpine3.8
23+
env: VERSION=1.11 VARIANT=alpine3.9
2224

2325
install:
2426
- git clone https://github.com/docker-library/official-images.git ~/official-images

1.11/alpine3.8/Dockerfile renamed to 1.11/alpine3.10/Dockerfile

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

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

1.12/alpine3.10/Dockerfile

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM alpine:3.10
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.12.6
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 'c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca *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

generate-stackbrew-library.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare -A aliases=(
99
defaultDebianSuite='stretch'
1010
declare -A debianSuite=(
1111
)
12-
defaultAlpineVersion='3.9'
12+
defaultAlpineVersion='3.10'
1313
declare -A alpineVersion=(
1414
#[1.9]='3.7'
1515
)
@@ -72,7 +72,7 @@ for version in "${versions[@]}"; do
7272
)
7373

7474
for v in \
75-
stretch alpine{3.9,3.8} \
75+
stretch alpine{3.10,3.9} \
7676
windows/windowsservercore-{ltsc2016,1803,1809} \
7777
windows/nanoserver-{1803,1809} \
7878
; 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.8,3.9} \
87+
alpine{3.9,3.10} \
8888
stretch \
8989
; do
9090
if [ -d "$version/$variant" ]; then

0 commit comments

Comments
 (0)