-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from J0WI/alpine-3.13
Alpine 3.13
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM alpine:3.13 | ||
|
||
ENV JULIA_PATH /usr/local/julia | ||
ENV PATH $JULIA_PATH/bin:$PATH | ||
|
||
# https://julialang.org/juliareleases.asc | ||
# Julia (Binary signing key) <buildbot@julialang.org> | ||
ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495 | ||
|
||
# https://julialang.org/downloads/ | ||
ENV JULIA_VERSION 1.5.3 | ||
|
||
RUN set -eux; \ | ||
\ | ||
apk add --no-cache --virtual .fetch-deps gnupg; \ | ||
\ | ||
# https://julialang.org/downloads/#julia-command-line-version | ||
# https://julialang-s3.julialang.org/bin/checksums/julia-1.5.3.sha256 | ||
# this "case" statement is generated via "update.sh" | ||
apkArch="$(apk --print-arch)"; \ | ||
case "$apkArch" in \ | ||
# amd64 | ||
x86_64) tarArch='x86_64'; dirArch='x64'; sha256='2faf4ebe3b5fa1bbee853655ef7c292b457e80d3fca1af1c8d3f179286b27da6' ;; \ | ||
*) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \ | ||
esac; \ | ||
\ | ||
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ | ||
wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ | ||
wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz"; \ | ||
\ | ||
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \ | ||
\ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$JULIA_GPG"; \ | ||
gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ | ||
command -v gpgconf > /dev/null && gpgconf --kill all; \ | ||
rm -rf "$GNUPGHOME" julia.tar.gz.asc; \ | ||
\ | ||
mkdir "$JULIA_PATH"; \ | ||
tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \ | ||
rm julia.tar.gz; \ | ||
\ | ||
apk del --no-network .fetch-deps; \ | ||
\ | ||
# smoke test | ||
julia --version | ||
|
||
CMD ["julia"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters