Created
September 4, 2022 12:26
-
-
Save algas/6d0f58fb7e7602fea77155c4b9fa5830 to your computer and use it in GitHub Desktop.
GitHub Codespeces for Haskell
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
Show hidden characters
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | |
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu | |
{ | |
"name": "Ubuntu", | |
"build": { | |
"dockerfile": "Dockerfile", | |
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04 | |
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon. | |
"args": { "VARIANT": "ubuntu-22.04" } | |
}, | |
// Use 'forwardPorts' to make a list of ports inside the container available locally. | |
// "forwardPorts": [], | |
// Use 'postCreateCommand' to run commands after the container is created. | |
// "postCreateCommand": "uname -a", | |
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | |
"remoteUser": "vscode" | |
} |
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
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile | |
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 | |
ARG VARIANT="jammy" | |
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} | |
# [Optional] Uncomment this section to install additional OS packages. | |
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 | |
ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.0.2 | |
ENV BOOTSTRAP_HASKELL_CABAL_VERSION=3.4.1.0 | |
ENV BOOTSTRAP_HASKELL_INSTALL_STACK=1 | |
ENV BOOTSTRAP_HASKELL_INSTALL_HLS=1 | |
ENV BOOTSTRAP_HASKELL_ADJUST_BASHRC=P | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && \ | |
apt-get -y install --no-install-recommends git sudo jq bc make automake rsync htop curl build-essential lsb-release pkg-config libffi-dev libgmp-dev software-properties-common libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ wget libncursesw5 libtool autoconf && \ | |
apt-get clean | |
USER vscode | |
RUN bash -c "curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh" | |
# Add ghcup to PATH | |
ENV PATH=${PATH}:/home/vscode/.local/bin | |
ENV PATH=${PATH}:/home/vscode/.ghcup/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment