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

Optimize Dockerfile #639

Closed
reglim opened this issue Oct 3, 2023 · 0 comments · Fixed by #640
Closed

Optimize Dockerfile #639

reglim opened this issue Oct 3, 2023 · 0 comments · Fixed by #640

Comments

@reglim
Copy link
Contributor

reglim commented Oct 3, 2023

During development, a lot of unnecessary installs are performed because the dependencies are installed after copying the code, which means docker doesn't cache it.

For further reference: https://www.augmentedmind.de/2022/02/06/optimize-docker-image-size/

reglim added a commit that referenced this issue Oct 3, 2023
I switched from using node:20.5 to node:20-slim, saving a lot of bandwidth when it has to be pulled.
I also moved the yarn install up so it only installs the dependencies when the package.json or yarn.lock files changed.

fixes: #639
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 a pull request may close this issue.

1 participant