Added Haskell

This commit is contained in:
2026-03-27 16:02:27 +01:00 Verified
parent 9502c4f433
commit 5dacab7d65
+27 -2
View File
@@ -57,10 +57,35 @@ RUN curl -fsL --show-error ${URL} | tar xfz - -C /usr/share && \
chmod -R 755 /usr/share/scala && \ chmod -R 755 /usr/share/scala && \
ln -s /usr/share/scala/bin/* /usr/local/bin ln -s /usr/share/scala/bin/* /usr/local/bin
FROM scala AS lth FROM scala AS haskell-init
# Install required C libraries and build tools for Haskell/GHC
RUN apt-get install -y \
build-essential \
libgmp-dev \
libffi-dev \
libnuma-dev \
zlib1g-dev \
libtinfo-dev
# Install ghcup and Haskell tools globally in /opt
ENV GHCUP_INSTALL_BASE_PREFIX=/opt
ENV PATH="/opt/.ghcup/bin:${PATH}"
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | \
BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
BOOTSTRAP_HASKELL_GHC_VERSION=latest \
BOOTSTRAP_HASKELL_CABAL_VERSION=latest \
BOOTSTRAP_HASKELL_HLS_VERSION=latest \
sh
# Ensure the toolchain is readable and executable by all users
RUN chmod -R a+rX /opt/.ghcup
FROM haskell-init AS lth
# Clears apt lists # Clears apt lists
RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/lib/apt/lists/*
# Adds the default User # Adds the default User
ARG USER=lth-student ARG USER=lth-student