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

Docker image improvements #496

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Conversation

Tarliton
Copy link
Contributor

@Tarliton Tarliton commented Feb 4, 2024

This PR removes unnecessary commands in the Dockerfile such as mkdir (WORKDIR creates it if it's not there.
Adding a cache to the yarn install command will speed up builds when updating any dependency.

The final image was being build with the data folder created by docker-compose mongo container and the .git folder, increasing its size.
The image size went from 1.3~GB to around 400MB.

Add build cache for yarn install command
Remove unnecessary mkdir command
Copy link
Member

@miltonbsn miltonbsn left a comment

Choose a reason for hiding this comment

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

Great ⭐⭐⭐⭐⭐

@miltonbsn miltonbsn merged commit d51648f into brmodeloweb:main Feb 4, 2024
@miltonbsn
Copy link
Member

@all-contributors please add @Tarliton for code and infra

Copy link
Contributor

@miltonbsn

I've put up a pull request to add @Tarliton! 🎉

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