Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Use Build Kit docker feature to shrink the Docker image size #3669

Merged
merged 8 commits into from
Jan 27, 2021

Conversation

nicknezis
Copy link
Contributor

Resolves #3666

The heron-install.sh file was being left in a Docker layer after the install. This is causing the Heron distribution image to be about 2.3 GB in size. This change helps drop the dize to roughly 1.1 GB.

@nicknezis nicknezis self-assigned this Jan 23, 2021
@nicknezis nicknezis marked this pull request as ready for review January 23, 2021 04:01
Copy link
Contributor

@Code0x58 Code0x58 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requiring docker buildx for builds sounds reasonable to me as people may usually have it from their reasonably up to date docker installation.

I tried to test the build process with the command below but it highlighted that debian9 doesn't have the required version of python, but the others built normally.

./scripts/release/docker-images "$(git describe --tags)" --all

It looks like there's ~190M of additional space which could be cut out of the heron install due to file duplication. I made #3670 for that in case anyone feels it's worth picking up.

docker/dist/Dockerfile.dist.centos7 Outdated Show resolved Hide resolved
Copy link
Member

@joshfischer1108 joshfischer1108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to make any changes to the documentation to account for buildx?

@nicknezis
Copy link
Contributor Author

nicknezis commented Jan 25, 2021

Do we need to make any changes to the documentation to account for buildx?

That's a good question. I did a recursive grep through the repo for docker build. I think we either don't have enough documentation or it's referencing the bash scripts. I'll do a scan to look for other things that should be updated. Probably a good idea to mention the docker minimum version. I can update the version check script also.

@nicknezis nicknezis merged commit a51c822 into master Jan 27, 2021
@nicknezis nicknezis deleted the nicknezis/buildkit-shrink branch January 27, 2021 04:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The distribution Dockerfiles are larger than they need to be
3 participants