Purge build deps to shrink the 12.15 image from 2.47 GB to 1.76 GB #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For our official CircleCI Docker Convenience Image support policy, please see CircleCI docs.
This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images.
Description
Purge build deps to shrink image from 2.42 GB to 1.76 GB
The space savings are for the 12.15 image, built locally with this commit compared with the latest published version.
Combine the pg and pg_cron layers to avoid installing & purging build-depends several times.
Gosu is used in entrypoint, so it is not purged.
locales is required by Pg at runtime, so it is not purged.
cimg/postgres
is the most recently published that I pulled down from Docker Hub.12.15-before
is an image I built from the commit immediately before the one I'm adding here12.15
is with this commitReasons
I want to shrink the postgresql image sizes. This should improve spin-up time a little, especially if the image is not in the local Docker Layer Cache. It also helps for local development.
I achieved the space savings by installing & purging build-time dependencies in the postgres and pg_cron installation steps.
Checklist
Please check through the following before opening your PR. Thank you!
Dockerfile.template
file only