Skip to content

Commit 01c9f56

Browse files
authored
Merge pull request #51 from infosiftr/1.6-alpine
Add Alpine variant to 1.6
2 parents f87eb34 + 82bc0a6 commit 01c9f56

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

1.6-rc/alpine3.13/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM alpine:3.13
2+
3+
ENV JULIA_PATH /usr/local/julia
4+
ENV PATH $JULIA_PATH/bin:$PATH
5+
6+
# https://julialang.org/juliareleases.asc
7+
# Julia (Binary signing key) <[email protected]>
8+
ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495
9+
10+
# https://julialang.org/downloads/
11+
ENV JULIA_VERSION 1.6.0-rc2
12+
13+
RUN set -eux; \
14+
\
15+
apk add --no-cache --virtual .fetch-deps gnupg; \
16+
\
17+
# https://julialang.org/downloads/#julia-command-line-version
18+
# https://julialang-s3.julialang.org/bin/checksums/julia-1.6.0-rc2.sha256
19+
# this "case" statement is generated via "update.sh"
20+
apkArch="$(apk --print-arch)"; \
21+
case "$apkArch" in \
22+
# amd64
23+
x86_64) tarArch='x86_64'; dirArch='x64'; sha256='8c04675221c6494ada41cb5c1abe08ff18703626b6fd7161132cd56324913f8e' ;; \
24+
*) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \
25+
esac; \
26+
\
27+
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \
28+
wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \
29+
wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz"; \
30+
\
31+
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \
32+
\
33+
export GNUPGHOME="$(mktemp -d)"; \
34+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$JULIA_GPG"; \
35+
gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \
36+
command -v gpgconf > /dev/null && gpgconf --kill all; \
37+
rm -rf "$GNUPGHOME" julia.tar.gz.asc; \
38+
\
39+
mkdir "$JULIA_PATH"; \
40+
tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \
41+
rm julia.tar.gz; \
42+
\
43+
apk del --no-network .fetch-deps; \
44+
\
45+
# smoke test
46+
julia --version
47+
48+
CMD ["julia"]

0 commit comments

Comments
 (0)