Skip to content
Snippets Groups Projects

GHC CI Docker images

This repository contains the Docker images used for most of GHC's Linux-based CI builds. These are built via CI and pushed to this repository's Docker Registry.

See the GHC Wiki for details.

CI Pipeline

The Dockerfiles are defined via Dhall expressions. In particular, each major class of Linux distributions has its definitions defined in a file in the images/ directory. Logic for managing various shared toolchain components (e.g. GHC, cabal-install, and LLVM) is contained in components/.

The CI build proceeds as follows:

  • the pipeline in .gitlab-ci.yml uses gitlab-pipeline.dhall to generate gitlab-pipeline.yaml which defines a child pipeline describing the jobs needed to build each of the defined images.
  • the generate job in gitlab-pipeline.yaml generates Dockerfiles using dockerfiles.dhall. These are propagated as artifacts to the jobs that follow.
  • each of the jobs in the build and build-derived stages derived in gitlab-pipeline.yaml build a Docker image from one of the Dockerfiles generated by the generate job.

Building images manually

To build images outside of CI (e.g. for testing) simply generate the Dockerfiles from dockerfiles.dhall using the dhall to-directory-tree command:

$ dhall to-directory-tree --file=dockerfiles.dhall --output=dockerfiles

This will produce a directory, dockerfiles/, which contains one directory per Docker image.