Skip to content

acilearning/docker-haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-haskell

This Docker image provides a Haskell development environment with the following tools:

  • GHCup version 0.1.20.0
  • GHC version 9.8.1, 9.6.4, or 9.4.8
  • Cabal version 3.10.2.1
  • Stack version 2.13.1
  • HLS version 2.6.0.0

Usage

This Docker image supports both AMD64 (x86_64) and ARM64 (aarch64) architectures.

To get started, select one of the supported versions of GHC. The Docker image is available at public.ecr.aws/acilearning/haskell:$GHC. For example, to use GHC 9.8.1 you would use the image public.ecr.aws/acilearning/haskell:9.8.1.

Note that the image tag can and often is updated with newer tools. To pin a specific version, add the commit hash to the end of the tag. The format is public.ecr.aws/acilearning/haskell:$GHC-$COMMIT. For example, to use GHC 9.8.1 at a specific commit you would use the image public.ecr.aws/acilearning/haskell:9.8.1-3a8c34f81332de06c4c2239e144a63dfd11de9f0. This is recommended for reproducible builds.

Development Container

This Docker image is designed to be used as a Development Container.

Here is an example .devcontainer.json file:

{
  "customizations": { "vscode": { "extensions": [ "haskell.haskell" ] } },
  "dockerComposeFile": "compose.yaml",
  "postCreateCommand": "cabal update",
  "postStartCommand": "git config --global --add safe.directory \"$PWD\"",
  "service": "devcontainer",
  "workspaceFolder": "/workspace"
}

And the corresponding compose.yaml file:

services:
  devcontainer:
    command: sleep infinity
    image: public.ecr.aws/acilearning/haskell:9.8.1
    init: true
    volumes: [ .:/workspace ]
    working_dir: /workspace

Depending on your specific scenario, you may want to create volumes one or more of the following directories:

  • Cabal's cache: /home/vscode/.cache/cabal
  • Cabal's state: /home/vscode/.local/state/cabal (can be an external volume shared between projects)
  • Stack's share: /home/vscode/.local/share/stack

About

🐳 Haskell development environment in Docker.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •