Skip to content

Proposal to use incremental builds

Stefan Spettel requested to merge dockerfile_incremental into develop

Description

Always when we rebuild an image, we have to re-compile all the dependencies because we copy all the files before installing the dependencies. With the proposed changes, we only copy the files used for the external dependencies. In that case, we can use the Docker caches. When something in the dependencies change, they are rebuilt. If not, then not.

With this approach, we can also remove the Ubuntu CI Dockerfile, because it does essentially the same (given that the CI does not remove the old build images completely?) It would also help because we don't have to manually rebuild the CI image when dependencies change.

Pros

  • Developers can just use this Dockerfile and don't have to create their own
  • Can be used in the CI instead of manually-created Dockerfile
  • Should also speed-up the RHEL build
  • Use Docker's caching mechanism

Cons

  • More "complex" Dockerfile
  • It doesn't rebuild all the dependencies each CI run, but why do we actually want that?

Merge request reports