
This is the Git repository for the Docker Official Image for haskell.
For usage examples and image tags, see the Docker Hub page.
| Operating System | Support | Supported Versions | Support Variants |
|---|---|---|---|
| Debian | Yes | bookworm, bullseye, buster (legacy, hand-maintained) | standard, slim |
| Alpine | Planned | last 2 releases | N/A |
| Windows | Planned | ltsc2022 | windowsservercore, nanoserver |
Currently maintained GHC lines: 9.6, 9.8, 9.10, 9.12, 9.14 (matches the CI matrix). Older lines (9.0, 9.2, 9.4) are kept for legacy use and do not receive routine Cabal/Stack updates.
Stack and cabal-install are downloaded as upstream release archives and installed into /usr/local/bin.
GHC is installed from upstream bindists into /opt/ghc/<version>.
Each installation step verifies:
sha256)The image PATH includes:
/root/.cabal/bin/root/.local/bin/opt/ghc/${GHC}/binVerification follows the Docker Official Images preferred process:
These images will support GHC minor versions (e.g., 9.2) that are either actively being maintained (new patch releases will come out) or are still popular. 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.
Only the latest patch release in each actively maintained minor line receives routine updates.
For actively supported GHC versions, Cabal and Stack should be updated when new versions are released.
Most Dockerfiles are generated from template/Dockerfile.ncl using Nickel data
files, validated against the contract in template/schema.ncl. The repository
ships two entry points:
./generate.sh <data-file.ncl> <output-file> — bash wrapper that runs
nickel export for a single data file. Used ad-hoc../generate_dockerfiles.nu — nushell script that regenerates every
data-driven Dockerfile in one pass. This is what CI runs (see
Dockerfile generator workflow).Regenerate a single Dockerfile from the repository root with the bash helper:
./generate.sh 9.14/bookworm.ncl 9.14/bookworm/Dockerfile
You can also run Nickel directly (note the Schema validation, matching the
helper scripts):
nickel export --format text -o 9.14/bookworm/Dockerfile - <<'EOF'
let render = import "template/Dockerfile.ncl" in
let {Schema} = import "template/schema.ncl" in
let config = import "9.14/bookworm.ncl" in
render (config | Schema)
EOF
To regenerate every data-driven Dockerfile at once:
nu ./generate_dockerfiles.nu
The nu entry point accepts a single optional --pattern (-p) flag, a
regex matched against the full data-file path. Use it to limit a run to a
single GHC line, a single variant, or a single file. Some examples:
nu ./generate_dockerfiles.nu # every data-driven Dockerfile
nu ./generate_dockerfiles.nu --pattern '14' # only 9.14 variants
nu ./generate_dockerfiles.nu --pattern 'bookworm$' # every bookworm variant
nu ./generate_dockerfiles.nu --pattern '10/buster' # exactly one file
The pattern is a Nushell/PCRE regex; the \. escapes are required. Anchor
patterns with ^/$ where you need exact matches (for example '^9\.14/'
matches only the 9.14 directory and not a hypothetical 9.140/). Lines
without .ncl data (9.0, 9.2) and hand-maintained Dockerfiles (9.4–9.8
buster, 9.10 buster/slim-buster) are skipped regardless of the filter, since
they have no source data file to match.
Run nu ./generate_dockerfiles.nu --help for the full doc comments.
General layout:
template/Dockerfile.ncl is the rendered templatetemplate/schema.ncl is the Nickel contract applied to each data file<GHC line>/<variant>.ncl (for example 9.14/bookworm.ncl) contains distro-specific values<GHC line>/_globals.ncl contains shared values (for example Stack and cabal-install versions)<GHC line>/_ghc.ncl and <GHC line>/_cabal-install*.ncl<GHC line>/<variant>/Dockerfile is the generated outputNote: not every Dockerfile is generated from .ncl data. GHC 9.0 and 9.2
have no .ncl data files at all — their Dockerfiles are hand-maintained and
the generator skips them. GHC 9.4/9.6/9.8 only have .ncl data for
bullseye and slim-bullseye; the buster and slim-buster Dockerfiles in those
lines are also hand-maintained. GHC 9.10 has .ncl data for bookworm,
bullseye, slim-bookworm, and slim-bullseye; the 9.10/buster/Dockerfile and
9.10/slim-buster/Dockerfile are hand-maintained and not regenerated by
generate_dockerfiles.nu.
docker build -t haskell-local 9.14/bookworm
docker run -it haskell-local bash
This is a two-step process:
haskell/docker-haskell).When GHC, cabal-install, or Stack releases a new version:
.ncl files (for example 9.12.4 -> 9.12.5).https://downloads.haskell.org/~ghc/<version>/SHA256SUMS.x86_64 and aarch64 checksums for each affected distro/bindist.overrides.ghc.aarch64.url usage).Known GHC releasers:
_globals.ncl files.https://downloads.haskell.org/~cabal/cabal-install-<version>/SHA256SUMS.x86_64-linux-deb10, aarch64-linux-deb10,
x86_64-linux-deb11, aarch64-linux-deb11, x86_64-linux-deb12, aarch64-linux-deb12,
as needed by the affected lines).Known cabal-install releasers:
_globals.ncl files.stack-<version>-linux-x86_64.tar.gz.sha256
and stack-<version>-linux-aarch64.tar.gz.sha256).The Stack signing key is documented at https://docs.haskellstack.org/en/stable/SIGNING_KEY/ and is typically stable.
Images are built and released by Docker Official Images. The haskell entry is maintained in:
Typical release steps:
GitCommit to the new commit in this repository.Tags when needed.docker-library/official-images with a clear summary.More details: https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what
Docker Hub docs for this image live in:
This repository's CI (Validate Debian) builds images and runs the upstream official-images tests.
The build-smoke-test job builds every maintained GHC line (9.6, 9.8, 9.10, 9.12, 9.14) on
bullseye and additionally bookworm for the 9.12 and 9.14 lines. The arm64-tests job builds
bullseye for every maintained line and bookworm for 9.10/9.12/9.14 (slim variants are excluded
on arm64).
Dockerfiles are linted with hadolint via GitHub Actions.
Global exceptions are configured in .hadolint.yaml.
Dockerfile
85.5%
Nickel
12.6%
Nushell
1.3%

This is the Git repository for the Docker Official Image for haskell.
For usage examples and image tags, see the Docker Hub page.
| Operating System | Support | Supported Versions | Support Variants |
|---|---|---|---|
| Debian | Yes | bookworm, bullseye, buster (legacy, hand-maintained) | standard, slim |
| Alpine | Planned | last 2 releases | N/A |
| Windows | Planned | ltsc2022 | windowsservercore, nanoserver |
Currently maintained GHC lines: 9.6, 9.8, 9.10, 9.12, 9.14 (matches the CI matrix). Older lines (9.0, 9.2, 9.4) are kept for legacy use and do not receive routine Cabal/Stack updates.
Stack and cabal-install are downloaded as upstream release archives and installed into /usr/local/bin.
GHC is installed from upstream bindists into /opt/ghc/<version>.
Each installation step verifies:
sha256)The image PATH includes:
/root/.cabal/bin/root/.local/bin/opt/ghc/${GHC}/binVerification follows the Docker Official Images preferred process:
These images will support GHC minor versions (e.g., 9.2) that are either actively being maintained (new patch releases will come out) or are still popular. 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.
Only the latest patch release in each actively maintained minor line receives routine updates.
For actively supported GHC versions, Cabal and Stack should be updated when new versions are released.
Most Dockerfiles are generated from template/Dockerfile.ncl using Nickel data
files, validated against the contract in template/schema.ncl. The repository
ships two entry points:
./generate.sh <data-file.ncl> <output-file> — bash wrapper that runs
nickel export for a single data file. Used ad-hoc../generate_dockerfiles.nu — nushell script that regenerates every
data-driven Dockerfile in one pass. This is what CI runs (see
Dockerfile generator workflow).Regenerate a single Dockerfile from the repository root with the bash helper:
./generate.sh 9.14/bookworm.ncl 9.14/bookworm/Dockerfile
You can also run Nickel directly (note the Schema validation, matching the
helper scripts):
nickel export --format text -o 9.14/bookworm/Dockerfile - <<'EOF'
let render = import "template/Dockerfile.ncl" in
let {Schema} = import "template/schema.ncl" in
let config = import "9.14/bookworm.ncl" in
render (config | Schema)
EOF
To regenerate every data-driven Dockerfile at once:
nu ./generate_dockerfiles.nu
The nu entry point accepts a single optional --pattern (-p) flag, a
regex matched against the full data-file path. Use it to limit a run to a
single GHC line, a single variant, or a single file. Some examples:
nu ./generate_dockerfiles.nu # every data-driven Dockerfile
nu ./generate_dockerfiles.nu --pattern '14' # only 9.14 variants
nu ./generate_dockerfiles.nu --pattern 'bookworm$' # every bookworm variant
nu ./generate_dockerfiles.nu --pattern '10/buster' # exactly one file
The pattern is a Nushell/PCRE regex; the \. escapes are required. Anchor
patterns with ^/$ where you need exact matches (for example '^9\.14/'
matches only the 9.14 directory and not a hypothetical 9.140/). Lines
without .ncl data (9.0, 9.2) and hand-maintained Dockerfiles (9.4–9.8
buster, 9.10 buster/slim-buster) are skipped regardless of the filter, since
they have no source data file to match.
Run nu ./generate_dockerfiles.nu --help for the full doc comments.
General layout:
template/Dockerfile.ncl is the rendered templatetemplate/schema.ncl is the Nickel contract applied to each data file<GHC line>/<variant>.ncl (for example 9.14/bookworm.ncl) contains distro-specific values<GHC line>/_globals.ncl contains shared values (for example Stack and cabal-install versions)<GHC line>/_ghc.ncl and <GHC line>/_cabal-install*.ncl<GHC line>/<variant>/Dockerfile is the generated outputNote: not every Dockerfile is generated from .ncl data. GHC 9.0 and 9.2
have no .ncl data files at all — their Dockerfiles are hand-maintained and
the generator skips them. GHC 9.4/9.6/9.8 only have .ncl data for
bullseye and slim-bullseye; the buster and slim-buster Dockerfiles in those
lines are also hand-maintained. GHC 9.10 has .ncl data for bookworm,
bullseye, slim-bookworm, and slim-bullseye; the 9.10/buster/Dockerfile and
9.10/slim-buster/Dockerfile are hand-maintained and not regenerated by
generate_dockerfiles.nu.
docker build -t haskell-local 9.14/bookworm
docker run -it haskell-local bash
This is a two-step process:
haskell/docker-haskell).When GHC, cabal-install, or Stack releases a new version:
.ncl files (for example 9.12.4 -> 9.12.5).https://downloads.haskell.org/~ghc/<version>/SHA256SUMS.x86_64 and aarch64 checksums for each affected distro/bindist.overrides.ghc.aarch64.url usage).Known GHC releasers:
_globals.ncl files.https://downloads.haskell.org/~cabal/cabal-install-<version>/SHA256SUMS.x86_64-linux-deb10, aarch64-linux-deb10,
x86_64-linux-deb11, aarch64-linux-deb11, x86_64-linux-deb12, aarch64-linux-deb12,
as needed by the affected lines).Known cabal-install releasers:
_globals.ncl files.stack-<version>-linux-x86_64.tar.gz.sha256
and stack-<version>-linux-aarch64.tar.gz.sha256).The Stack signing key is documented at https://docs.haskellstack.org/en/stable/SIGNING_KEY/ and is typically stable.
Images are built and released by Docker Official Images. The haskell entry is maintained in:
Typical release steps:
GitCommit to the new commit in this repository.Tags when needed.docker-library/official-images with a clear summary.More details: https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what
Docker Hub docs for this image live in:
This repository's CI (Validate Debian) builds images and runs the upstream official-images tests.
The build-smoke-test job builds every maintained GHC line (9.6, 9.8, 9.10, 9.12, 9.14) on
bullseye and additionally bookworm for the 9.12 and 9.14 lines. The arm64-tests job builds
bullseye for every maintained line and bookworm for 9.10/9.12/9.14 (slim variants are excluded
on arm64).
Dockerfiles are linted with hadolint via GitHub Actions.
Global exceptions are configured in .hadolint.yaml.
Dockerfile
85.5%
Nickel
12.6%
Nushell
1.3%