Add Docker layer caching for development builds#137
Conversation
📊 SonarQube Summary
|
🐳 Docker Image BuiltA new Docker image has been built for this PR: Image: Pull command: docker pull australia-southeast1-docker.pkg.dev/cpg-common/images-dev/cpg_flow:5a9a021727776b58f3781c6128a0d2efb95a54a5🔗 View in Google Cloud Console This comment was automatically generated by the Docker workflow. |
|
The aim was to add docker layer caching for development builds so as to speed up such builds. It would seem that the way to do that would be to refactor the Dockerfile so there are some separate layers to be able to cache and add to docker.yaml to enable caching across action runs. In this PR the Dockerfile has no new layers and docker.yaml has been entirely rewritten and now uses several third-party actions (from the It would be good for this PR to explain how the approach taken improves layer caching and provide some timing examples. But overall IMHO it would be preferable to enable layer caching within the existing docker.yaml steps and code, and compare timing for that, than to rewrite the action steps entirely. |
Summary
This PR implements Docker layer caching to significantly speed up CI builds for development branches while keeping production builds clean and reproducible.
Changes
docker/build-push-actionno-cache: truegithub.ref_nameinterpolation--lockedflag (uv's recommended option for Docker)--no-devto exclude development dependencies from production image