Build | Status | Badges | (per-arch) |
---|---|---|---|
This is the Git repo of the Docker "Official Image" for haskell
. See the Docker Hub page for the full readme on how to use this Docker image.
- Glasgow Haskell Compiler (GHC).
- Cabal the CLI tool.
- Haskell Stack the CLI tool.
Operating System | Support | Supported Versions | Support Variants |
---|---|---|---|
Debian | Yes | buster | standard, slim |
Alpine | Planned | Last 2 releases | N/A |
Windows | Planned | ltsc2022 | windowsservercore, nanoserver |
- amd64
- aarch64 (does not include Stack)
Cabal and Stack release binaries for various platforms. These are downloaded and made available eg. copied into /usr/local/bin
.
GHC releases an archive which includes scripts to install GHC. Once downloaded GHC is installed via:
./configure
(we pass in additional paramters to the configure step)make install
The installed binaries are made availabe on the PATH
.
Verification is done following the 'preferred' method for docker official images. This means we:
- Verify the release is published by the expected person via PGP key verification.
- Verify the sha256 of the release is as expected.
GHC minor versions (eg. 9.2) that are either actively being maintained (new patch releases will come out) or are still popular will be supported by these images. Once both of these are no longer true, support can be dropped. Users can still pull these images, however they will not be listed on the docker hub page and will no longer be updated with new Cabal and Stack versions.
Additionally, only the latest patch version of each major version of GHC will recieve further updates.
For actively supported GHC versions, Cabal and Stack should be updated when new versions are relesaed.
You can build and run the images locally with something like:
$ docker build -t haskell-local 9.2/buster && docker run -it haskell-local bash
When a new version of Cabal, Stack or GHC is released the images need to be updated. This involves:
- Update to the new version in the Dockerfile.
- Update the PGP key, if the person doing the release has changed.
- Updating the sha256 to the new version of the tool, for all supported processor architectures.
- For GHC: Updating the github actions to test the new version.
See an example of a GHC update.
Images are built and released by the central docker official images system. Specifically haskell is maintained in this file. See the docs on this format.
- Determine which docker haskell image GHC versions have been impacted by the unreleased changes.
- Update the
GitCommit
in thehaskell
file. - Update the
Tags
if these have changed. - Create a PR, including info on what has changed. The official images people will review the actual Dockerfile changes as they want official images to maintain a high level of quality.
- Once merged, their build system will run and the image updates will eventually be released.
This doc describes the process in more detail.
The docker hub haskell docs live in a separate repo.
The image tests live in the official-images repo. They are run against amd64 and aarch64 in this repo. When updating haskell
in the official images repo they are only run against amd64.
This is done via hadolint
. We should not be afraid to ignore hadolint rules globally if required as it is not really designed for the official images which have some nuances.