Created
December 2, 2025 08:11
-
-
Save ShinNoNoir/5a3984b6db740481484fe60d17a65048 to your computer and use it in GitHub Desktop.
VSCode Server with Haskell
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 gitpod/openvscode-server:latest | |
| # ------------------------------------------------- | |
| # GHCup requirements Ubuntu >= 20 && 23 | |
| # ------------------------------------------------- | |
| USER root | |
| RUN apt update \ | |
| && apt install -q -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| libffi-dev \ | |
| libffi8ubuntu1 \ | |
| libgmp-dev \ | |
| libgmp10 \ | |
| libncurses-dev \ | |
| libncurses5 \ | |
| libtinfo5 | |
| # ------------------------------------------------- | |
| # Install GHCup | |
| # ------------------------------------------------- | |
| USER openvscode-server | |
| RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org \ | |
| | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 sh | |
| ENV PATH="/home/workspace/.ghcup/bin:${PATH}" | |
| # ------------------------------------------------- | |
| # Install tools (GHC, cabal-install, HLS) | |
| # ------------------------------------------------- | |
| USER openvscode-server | |
| RUN ghcup install ghc recommended | |
| RUN ghcup set ghc recommended | |
| RUN ghcup install cabal recommended | |
| RUN ghcup install hls recommended | |
| # ------------------------------------------------- | |
| # Install VSCode extensions | |
| # ------------------------------------------------- | |
| USER openvscode-server | |
| ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server" | |
| ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server" | |
| RUN ${OPENVSCODE} --install-extension haskell.haskell | |
| # ------------------------------------------------- | |
| # Always switch back to user openvscode-server | |
| # ------------------------------------------------- | |
| USER openvscode-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment