Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Docker layers #187

Merged
merged 4 commits into from
Jul 25, 2023
Merged

Reduce Docker layers #187

merged 4 commits into from
Jul 25, 2023

Conversation

gbe
Copy link
Contributor

@gbe gbe commented Jul 19, 2023

1/ As mentionned in #96, this PR aims at reducing the number of layers of the Docker images for better performance, reduced image size and to remove potential caching quirks. To do so, the RUN calls are merged into one as recommended by Docker best practices.

For example, the released image full-3.0.2 has 28 layers. By reducing it to 4 layers, the new image is 0.9GB smaller.

2/ In addition, the image is based from debian:11-slim rather than debian:11. Any extra necessary packages to build the image will be pulled from Debian's repositories anyway.

3/ Finally, the apt cache files are removed from the image. There is no need to ship an image with outdated package lists.

@gbe gbe mentioned this pull request Jul 19, 2023
Copy link
Member

@Dramelac Dramelac left a comment

Choose a reason for hiding this comment

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

Waiting for the result of the pipeline & test but seems good to me, thank you @gbe for this update !
For your information, someone is already working with a multi-stage build approach for the exegol image. So we can merge the layers for now but we will have to split them again later when this next approach will be ready.

@QU35T-code QU35T-code added the enhancement New feature or request label Jul 20, 2023
@QU35T-code QU35T-code added the ready for merge in the waitlist for merge, requires preliminary steps label Jul 22, 2023
@ShutdownRepo ShutdownRepo linked an issue Jul 24, 2023 that may be closed by this pull request
@ShutdownRepo ShutdownRepo removed the ready for merge in the waitlist for merge, requires preliminary steps label Jul 25, 2023
@ShutdownRepo ShutdownRepo merged commit 55b6bdc into ThePorgs:dev Jul 25, 2023
1 check failed
@gbe gbe deleted the dockerfiles-layers branch July 25, 2023 12:57
@ShutdownRepo ShutdownRepo mentioned this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize images
4 participants