on master help sign in
add in a Dockerfile to build linux binaries
6541075Evan Czaplicki
installers/linux/Dockerfilenew file+22
@@ -0,0 +1,22 @@
1+FROM alpine:3.10
2+
3+# branch
4+ARG branch=master
5+# commit or tag
6+ARG commit=HEAD
7+
8+# Install required packages
9+RUN apk add --update ghc cabal git musl-dev zlib-dev ncurses-dev ncurses-static wget
10+
11+# Checkout elm compiler
12+WORKDIR /tmp
13+RUN git clone -b $branch https://github.com/elm/compiler.git
14+
15+# Build a statically linked elm binary
16+WORKDIR /tmp/compiler
17+RUN git checkout $commit
18+RUN rm worker/elm.cabal
19+RUN cabal new-update
20+RUN cabal new-configure --disable-executable-dynamic --ghc-option=-optl=-static --ghc-option=-optl=-pthread
21+RUN cabal new-build
22+RUN strip -s ./dist-newstyle/build/x86_64-linux/ghc-8.4.3/elm-0.19.1/x/elm/build/elm/elm