Description
Currently, Docker build scripts across the repository do not use the --pull flag, which means they may use stale cached base images instead of pulling the latest versions. This can lead to builds using outdated base images with potential security vulnerabilities or missing updates.
Affected Files
The following build scripts need to be updated to include the --pull flag:
Components Core Docker Images
components/core/tools/docker-images/clp-core-ubuntu-jammy/build.sh
components/core/tools/docker-images/clp-env-base-centos-stream-9/build.sh
components/core/tools/docker-images/clp-env-base-manylinux-2.28-aarch64/build.sh
components/core/tools/docker-images/clp-env-base-manylinux-2.28-x86_64/build.sh
components/core/tools/docker-images/clp-env-base-ubuntu-jammy/build.sh
Tools Docker Images
tools/docker-images/clp-execution-base-ubuntu-jammy/build.sh
Proposed Solution
Add the --pull flag to all docker build and docker buildx build commands in the build scripts. This ensures that:
- Base images are always pulled fresh from the registry
- Builds use the latest security updates and patches
- Consistent behavior across different environments
- Reduced risk of builds succeeding locally but failing in CI due to image differences
Example
For scripts using docker build:
docker build --pull --tag ...
For scripts using docker buildx build:
docker buildx build --pull --platform ... --tag ...
References
Acceptance Criteria
Description
Currently, Docker build scripts across the repository do not use the
--pullflag, which means they may use stale cached base images instead of pulling the latest versions. This can lead to builds using outdated base images with potential security vulnerabilities or missing updates.Affected Files
The following build scripts need to be updated to include the
--pullflag:Components Core Docker Images
components/core/tools/docker-images/clp-core-ubuntu-jammy/build.shcomponents/core/tools/docker-images/clp-env-base-centos-stream-9/build.shcomponents/core/tools/docker-images/clp-env-base-manylinux-2.28-aarch64/build.shcomponents/core/tools/docker-images/clp-env-base-manylinux-2.28-x86_64/build.shcomponents/core/tools/docker-images/clp-env-base-ubuntu-jammy/build.shTools Docker Images
tools/docker-images/clp-execution-base-ubuntu-jammy/build.shProposed Solution
Add the
--pullflag to alldocker buildanddocker buildx buildcommands in the build scripts. This ensures that:Example
For scripts using
docker build:For scripts using
docker buildx build:References
Acceptance Criteria
--pullflag