Created
August 15, 2020 19:32
-
-
Save erewok/7d658c71002941d0b3f732529ed53535 to your computer and use it in GitHub Desktop.
Cabal-stack Dockerfile
This file contains hidden or 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 debian:stretch-slim as base_os | |
## ensure locale is set during build | |
ENV LANG C.UTF-8 | |
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
RUN apt-get update \ | |
&& apt-get install --no-install-recommends -y \ | |
build-essential \ | |
libffi-dev \ | |
libgmp-dev \ | |
zlib1g-dev \ | |
curl \ | |
ca-certificates \ | |
tcl \ | |
netbase \ | |
gnupg dirmngr git \ | |
&& rm -rf /var/lib/apt/lists/*\ | |
&& mkdir -p /opt/lendio-offers/bin | |
RUN echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \ | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \ | |
apt-get update && \ | |
apt-get install -y --no-install-recommends ghc-8.8.3 cabal-install-3.2 \ | |
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \ | |
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \ | |
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \ | |
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \ | |
/usr/local/bin/stack config set system-ghc --global true && \ | |
/usr/local/bin/stack config set install-ghc --global false && \ | |
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz | |
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.2/bin:/opt/ghc/8.8.3/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment