Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#246] Optimize backend base image build process
This commit optimizes the build process for the backend base Docker image in the `scripts/govtool/Makefile`. It introduces conditional logic to build or push the base image only if it doesn't already exist in the repository, significantly reducing unnecessary builds and pushes, thereby saving time and resources. Key changes include: - The `build-backend` target now depends on `build-backend-base`, ensuring the base image is available before building the backend image. However, the base image will only be built if it is not already present, as checked by `docker manifest inspect`. - Similarly, `push-backend-base` incorporates a condition to push the base image only if it is not already available in the repository, using `docker manifest inspect` to verify its existence. This logic prevents redundant builds and uploads of the base image when no changes have occurred to the `vva-be.cabal` file, making the CI/CD pipeline more efficient. By building the base image only when necessary, we align with best practices for Docker image management and optimize our deployment workflow.
- Loading branch information