Skip to content

Make CI image slimmer

What does this MR do?

  • Reduces the context passed to the Docker build by adjusting .dockerignore.
  • Makes use of multi-stage builds
  • Reduces number of layers to 1
  • Provides a savings of ~120MB from the final image size (previously at 1.25GB)

Why was this MR needed?

We should have more control over the exact dependencies that make it into the CI image, and have an image that is as small as possible.

Are there points in the code the reviewer needs to double check?

  • We need to rename the CI_IMAGE before merging.
  • We might find that some packages are missing from this image in order to be able to execute steps that only run on master. This is a bit annoying, but at the same time will allow us to be more explicit about the dependencies in apt-get install.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Closes #25981 (closed)

Merge request reports