Created
May 29, 2015 02:21
-
-
Save mitchty/b6dcc2b919249637b365 to your computer and use it in GitHub Desktop.
Static ghc executables with musl+alpine linux
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
FROM alpine:latest | |
RUN apk add --update curl xz alpine-sdk perl gmp-dev file gmp openssh openssl | |
RUN cd /tmp && su -l operator -c "curl -o /tmp/ghc.xz 'http://10.11.12.2:8000/ghc-7.10.1-x86_64-unknown-linux-musl.tar.xz'" | |
RUN su -l operator -c "cd /tmp && xz -c -d /tmp/ghc.xz | tar xf -" | |
RUN cd /tmp/ghc-7.10.1 && ./configure --prefix=/opt && make install | |
RUN echo 'main = putStrLn "Hello static world"' > /tmp/static.hs | |
RUN /opt/bin/ghc --make -O2 --make -static -optc-static -optl-static /tmp/static.hs -optl-pthread -o /tmp/test | |
RUN openssl sha1 /tmp/test | |
RUN ldd /tmp/test | |
RUN file /tmp/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then from an ubuntu 12.04 image via:
vagrant init phusion/ubuntu-12.04-amd64