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

Split vue docker build into two stages #958

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Oct 22, 2024

After talking to my esteemed colleague Claude, I now realise that yarn install includes dev dependencies by default. By splitting our docker build into two stages, one that uses all deps to make the build, and the next that only installs runtime deps, combined with #957 I can shave ~ 1 GB off the final image size.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.38%. Comparing base (21f4303) to head (5b9e2ae).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #958   +/-   ##
=======================================
  Coverage   68.38%   68.38%           
=======================================
  Files          62       62           
  Lines        3928     3928           
=======================================
  Hits         2686     2686           
  Misses       1242     1242           

Copy link

cypress bot commented Oct 22, 2024

datalab    Run #2647

Run Properties:  status check passed Passed #2647  •  git commit bf097788b8 ℹ️: Merge 5b9e2ae4417772b7e18f62854bc23c7030c8c1ad into 21f430326e92dfdc40768dd7e5a8...
Project datalab
Branch Review ml-evs/fix-app-docker
Run status status check passed Passed #2647
Run duration 07m 10s
Commit git commit bf097788b8 ℹ️: Merge 5b9e2ae4417772b7e18f62854bc23c7030c8c1ad into 21f430326e92dfdc40768dd7e5a8...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 402
View all changes introduced in this branch ↗︎

@ml-evs ml-evs added build For issues/PRs pertaining to the build or deployment of the package webapp For issues/PRs pertaining to the web interface labels Oct 22, 2024
- only install production dependencies in final layer
@ml-evs ml-evs force-pushed the ml-evs/fix-app-docker branch from 2601230 to 5b9e2ae Compare October 25, 2024 11:11
@ml-evs ml-evs changed the title Split vue docker build into two layers Split vue docker build into two stages Oct 25, 2024
@ml-evs ml-evs merged commit 7d73043 into main Oct 25, 2024
17 checks passed
@ml-evs ml-evs deleted the ml-evs/fix-app-docker branch October 25, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build For issues/PRs pertaining to the build or deployment of the package webapp For issues/PRs pertaining to the web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant