-
Notifications
You must be signed in to change notification settings - Fork 6.3k
fix: Exclude .deb files from release Docker image #5068
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
Conversation
I guess the "semantic pull request" check is failing because it wants a prefix on the PR title, but I'm not sure what would be most appropriate. It's not really a "feature", so maybe "perf"?
Good question. perf
seems good to me although we do not have that as an option so we would need to add it.
code-server/.github/semantic.yaml
Lines 37 to 66 in 5bc26e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are some excellent savings. The multi-stage build is clever! Thanks for the improvement!
Codecov Report
Merging #5068 (63d0128) into main (5bc26e9) will not change coverage.
The diff coverage isn/a
.
❗ Current head 63d0128 differs from pull request most recent head 163938d. Consider uploading reports for the commit 163938d to get more accurate results
@@ Coverage Diff @@ ## main #5068 +/- ## ======================================= Coverage 71.30% 71.30% ======================================= Files 30 30 Lines 1683 1683 Branches 373 373 ======================================= Hits 1200 1200 Misses 413 413 Partials 70 70
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5bc26e9...163938d. Read the comment docs.
Echoing Asher, those are some huge improvements. Thank you so much for doing this!
Currently, the
codercom/code-server
Docker image includes a copy of the release's .deb package files, even though they're only used in an intermediate layer. What's more, it includes packages from every architecture, not just the one being released.This patch fixes this by updating the Dockerfile to use a multi-stage build. First, the packages are copied from the local build context into a temporary directory in a "scratch" build stage. Then, this directory is mounted into the main build, so that the appropriate .deb file can be installed without ever being actually stored in the image.
In my testing (with the 4.2.0 packages for linux-amd64) this reduces the total compressed and uncompressed size by a fairly substantial amount:
Partially fixes #4112