1
0
Fork 0

Update Dockerfile and devcontainer.json for improved Haskell setup

main
Sebastian Steger 2026-10-29 19:45:38 +00:00
parent 05a3ea30d6
commit 1a92d9b0ca
2 changed files with 50 additions and 15 deletions

View File

@ -1,10 +1,41 @@
FROM ubuntu:24.04 FROM ubuntu:26.04
RUN apt-get update && apt-get install -y build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev RUN apt-get update && apt-get install -y \
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh build-essential \
ENV PATH="$PATH:/root/.ghcup/bin" curl \
RUN ghcup install hls libffi-dev \
RUN apt-get update && apt-get install -y git zlib1g-dev libffi8ubuntu1 \
RUN cabal update && cabal install ghci-dap haskell-debug-adapter libgmp-dev \
RUN cabal update && cabal install --lib HUnit 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/*

View File

@ -3,10 +3,14 @@
"build": { "build": {
"dockerfile": "Dockerfile" "dockerfile": "Dockerfile"
}, },
"customizations": { "customizations": {
"vscode": { "extensions": [ "vscode": {
"haskell.haskell", "extensions": [
"phoityne.phoityne-vscode" "haskell.haskell",
]} "phoityne.phoityne-vscode"
} ]
} }
},
"remoteUser": "ubuntu",
"updateRemoteUserUID": true
}