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: update Dockerfile to reduce the image size #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdurieux
Copy link

Hi there,

I've made a small improvement to the Dockerfile that I think could help optimize the image size.

Summary of the changes:

  • I added the --no-install-recommends to with apt-get in order to not install unnecessary packages and reduce the image size.
  • I put apt-get update and apt-get install in a single layer to optimize the layers and reduce the number of unneeded files
  • I added rm -rf /var/lib/apt/lists/* after apt-get install which removes unnecessary files and reduces the size of the image.

Impact on the image size:

  • Image size before repair: 186.45 MB
  • Image size after repair: 148.73 MB
  • Difference: 37.72 MB (20.23%)

I hope that you will find these changes useful to you. Let me know if you have any questions or concerns.

Thanks,

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.

1 participant