A container with common Haskell dev tools readily available
1.6K
This provides a Docker container image that includes common Haskell build tools so that you can start developing and building your Haskell app right away without setting up a local dev environment.
Tools included in containser:
Install extension DevContainers.
Copy directory .devcontainer/ to your Haskell project's root directory. Change the docker image tag in .devcontainer as you see fit.
Bring up Command palette, and run Dev Containers: Open Folder in Container.
Now you can build the project in VSCode's terminal using either cabal or stack.
Go to the Haskell project you're working on in the terminal:
cd my-haskell-project
Then start the dev container and mount the project into it:
code is a pre-created user in the container:
docker run -d --rm --name haskell-dev-container -v .:/home/code/app bjing/haskell-dev-container:latest
Get into the container by running:
docker exec -it haskell-dev-container bash
Now you're inside the container with the project directory mounted. You can use
either cabal or stack depending on what you're using to build your project.
For example:
stack build
If you need tools that are not provided by the container,
simply installed it through Debian's apt package manager, e.g.
sudo apt install <package_name>
Since the container user code has sudo privilege, you can
install any tools you want.
The container image provides setup script for VIM Haskell IDE.
Simply run the setup script in /home/code/install:
cd ~/install
./setup_vim.sh
Content type
Image
Digest
sha256:10a1e0027…
Size
1.7 GB
Last updated
3 months ago
docker pull bjing/haskell-dev-container