Skip to content

Instantly share code, notes, and snippets.

@psftw
Created September 23, 2014 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psftw/0d255111588250de43ce to your computer and use it in GitHub Desktop.
Save psftw/0d255111588250de43ce to your computer and use it in GitHub Desktop.
attempt at haskell Dockerfile
FROM buildpack-deps:wheezy
ENV GHC_VERSION 7.8.3
ENV CABAL_VERSION 1.18.0.5
RUN apt-get update \
&& apt-get install -y libgmp-dev curl locales llvm clang \
&& rm -rf /var/lib/apt/lists/* \
&& dpkg-reconfigure locales \
&& locale-gen C.UTF-8 \
&& /usr/sbin/update-locale LANG=C.UTF-8 \
&& curl -SL http://www.haskell.org/ghc/dist/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-linux-deb7.tar.xz -o ghc.tar.xz \
&& curl -SL http://hackage.haskell.org/package/cabal-install-$CABAL_VERSION/cabal-install-$CABAL_VERSION.tar.gz -o cabal-install.tar.gz \
&& mkdir -p /usr/src/ghc /usr/src/cabal-install \
&& tar -xf ghc.tar.xz -C /usr/src/ghc --strip-components=1 \
&& tar -xf cabal-install.tar.gz -C /usr/src/cabal-install --strip-components=1 \
&& rm ghc.tar.xz cabal-install.tar.gz \
&& cd /usr/src/ghc && ./configure && make install \
&& cd /usr/src/cabal-install && ./bootstrap.sh
ENV PATH $PATH:/.cabal/bin
CMD ["/usr/local/bin/ghci"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment