-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# Install necessary packages for GHC (compiler) | ||
# Install necessary dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ghc cabal-install \ | ||
apt-utils curl build-essential libffi-dev libffi8 libgmp10 \ | ||
libgmp-dev libncurses-dev libncurses5 libtinfo5 pkg-config \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Maybe add Stack (another build tool for Haskell), up to Instructor? | ||
# RUN curl -sSL https://get.haskellstack.org/ | sh | ||
|
||
# Install GHCup (Haskell toolchain manager) | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | bash -s -- -y | ||
|
||
# Add GHCup to the PATH | ||
ENV PATH="/root/.ghcup/bin:${PATH}" | ||
|
||
# Install GHC 8.8.4 and Cabal using GHCup | ||
RUN ghcup install ghc 8.8.4 \ | ||
&& ghcup set ghc 8.8.4 \ | ||
&& ghcup install cabal \ | ||
&& cabal update | ||
|
||
WORKDIR /usr/src/app | ||
|
||
CMD ["/bin/bash"] | ||
CMD ["/bin/bash"] |