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
usesgitlab-pipeline.dhall
to generategitlab-pipeline.yaml
which defines a child pipeline describing the jobs needed to build each of the defined images. - the
generate
job ingitlab-pipeline.yaml
generates Dockerfiles usingdockerfiles.dhall
. These are propagated as artifacts to the jobs that follow. - each of the jobs in the
build
andbuild-derived
stages derived ingitlab-pipeline.yaml
build a Docker image from one of the Dockerfiles generated by thegenerate
job.
Building images manually
To build images outside of CI (e.g. for testing) simply generate the
Dockerfile
s 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.