forked from steger/pr3-ws202627
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
FROM ubuntu:26.04
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
libffi-dev \
|
|
libffi8ubuntu1 \
|
|
libgmp-dev \
|
|
libgmp10 \
|
|
libncurses-dev \
|
|
git \
|
|
zlib1g-dev \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
locales \
|
|
&& locale-gen en_US.UTF-8 \
|
|
&& update-locale LANG=en_US.UTF-8 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
USER ubuntu
|
|
|
|
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
|
|
BOOTSTRAP_HASKELL_INSTALL_HLS=1 \
|
|
BOOTSTRAP_HASKELL_GHC_VERSION=recommended \
|
|
BOOTSTRAP_HASKELL_CABAL_VERSION=recommended
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh \
|
|
&& ~/.ghcup/bin/ghcup gc -c -t \
|
|
&& rm -rf ~/.ghcup/cache/* \
|
|
&& find ~/.ghcup/ -name "*.tar.xz" -delete \
|
|
&& find ~/.ghcup/ -name "*.tar.gz" -delete \
|
|
&& find ~/.ghcup/ -type d -name "doc" -exec rm -rf {} + \
|
|
&& find ~/.ghcup/ -name "*_p.a" -delete \
|
|
&& rm -rf ~/.cabal/packages/*
|
|
|
|
ENV PATH="$PATH:/home/ubuntu/.ghcup/bin"
|
|
|
|
RUN cabal update && cabal install --lib HUnit \
|
|
&& rm -rf ~/.cabal/packages/*
|