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

chore: reduce the number of layers in docker image #421

Merged

Conversation

leaexplores
Copy link
Contributor

Purpose

Reduce the number of layer in a docker image will result in a smaller docker image filesize

Why ?

When doing RUN commands, each of them will create a new layer on the docker file system which will

  • Increase the image size (Hence more storage cost for images and disk space used)
  • Make the build a little slower

Note

I didn't combine the poetry build statement as we want still to have incremental rebuild when doing new builds, the ADD statement caches the file and won't run the sub-sequent RUN command if nothing has changed

@isra17
Copy link
Member

isra17 commented May 7, 2024

Look good to me, thanks for the contribution!

@isra17 isra17 merged commit 5cc26c3 into Flared:main May 7, 2024
1 check passed
@leaexplores leaexplores deleted the leaxplores/reduce-the-number-of-layers branch May 7, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants