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

Improve Dockerfile to reduce image size #989

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

tdurieux
Copy link
Contributor

@tdurieux tdurieux commented Jan 9, 2023

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 npm cache clean after npm install. It helps to reduce the size of the image.
  • I added --no-cache flag to apk add to ensure that no useless information is kept inside the Docker image.

Impact on the image size:

  • Image size before repair: 603.93 MB
  • Image size after repair: 479.92 MB
  • Difference: 124.01 MB (20.53%)

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

Thanks,

@Amndeep7 Amndeep7 added the ready-to-merge Used by mergify to identify if a PR is ready to merge into main. label Jan 30, 2023
@Amndeep7 Amndeep7 merged commit 94208ab into mitre:main Jan 30, 2023
@Amndeep7
Copy link
Contributor

@tdurieux thanks for your contribution! I would love to know more about how you came upon the SAF and how you're using it, especially with your security related projects that I saw from browsing your site. If you're interested in this conversation, please send me an email at amann@mitre.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Needs Review ready-to-merge Used by mergify to identify if a PR is ready to merge into main.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants