Skip to content

Latest commit

 

History

History

.devcontainer

Dev Containers

These Dev Containers provide the following tools:

The tools in the Haskell Toolchain are installed at /usr/local/bin 1,2.

ℹ️ Executables installed with Cabal (at $HOME/.cabal/bin or $HOME/.local/bin) or Stack or Pip (at $HOME/.local/bin)
take precedence over the same executable installed at /usr/local/sbin, /usr/local/bin, etc.

GHC 9.8

VS Code is used as IDE, with the following extensions pre‑installed:

Parent images

The parent images are multi‑arch (linux/amd64, linux/arm64/v8) GHC musl images. They are based on Alpine Linux (that is musl libc and BusyBox).

They contain unofficial binary distributions of GHC (that is, ones not released by the GHC developers). That is because:

  1. the official GHC binary distributions for Alpine Linux/x86_64 have known bugs ; and
  2. there are no official binary distributions for Alpine Linux/AArch64.

Stack's global configuration (/etc/stack/config.yaml) sets system-ghc: true and install-ghc: false. That ensures that only the GHC available in the Dev Containers is used.

Usage

For local/remote usage with VS Code, please follow the instructions at Developing inside a Container.

For use with Github Codespaces, please follow the instruction at Creating a codespace for a repository.

Versions

See the Version Matrix for detailed information.

Uniqueness

What makes these Dev Containers unique:

  1. Default mount:
    • source: empty directory
    • target: /home/vscode
    • type: volume
  2. Codespace only mount:
    • source: root of this repository
    • target: /workspaces
    • type: misc
  3. Default path: /home/vscode
  4. Default user: vscode
    • uid: 1000 (auto-assigned)
    • gid: 1000 (auto-assigned)
  5. Lifecycle scripts:

Persistence

Data in the following locations is persisted:

  1. The user's home directory (/home/vscode3)
  2. The Dev Container's workspace (/workspaces)

This is accomplished either via a volume or bind mount (or loop device on Codespaces) and is preconfigured.

ℹ️ Codespaces: A 'Full Rebuild Container' resets the home directory!
This is never necessary unless you want exactly that.

Haskell Language Server (HLS)

Choose Manually via PATH when asked the following question:

Manage HLS

License

The code in this directory is not part of ghc-musl (the software) and, with the exceptions noted in LICENSE, is distributed under the terms of the MIT License.

Footnotes

  1. PATH=$HOME/.cabal/bin:$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

  2. Some of them installed at /usr/bin for GHC versions < 9.2.8.

  3. Alternatively for the root user (/root). Use with Docker/Podman in rootless mode.