-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed Docker Image Size Ballooning #51034
Conversation
When running `useradd` without the `-l` option it can cause certain log files to reach absurd file sizes. This option avoids writing anything to these logs/
I haven't encountered this problem locally, so, I can't personally confirm whether or not this fix works. In theory it should, based on the research @horsemanV did. If possible, would you mind checking out this branch and seeing if it solves your problem @horsemanV? |
Size Change: +1.25 kB (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
Flaky tests detected in 8a8e02e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5100273374
|
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.
This change makes sense to me.
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.
Does -o
cover all the cases we were using || true
for? This looks good and tests well!
Yeah, we were only using |
@ObliviousHarmony it turns out my GitHub notifications I've just finished testing locally and can verify that yes, this PR does fix the issues. Attached is a screenshot of the new image sizes. While testing I did run into another issue (also seemingly related to users/groups in the Docker images), I'll check for it in open issues and write it up if it's not already reported elsewhere. Thanks again. |
When running `useradd` without the `-l` option it can cause certain log files to reach absurd file sizes. This option avoids writing anything to these logs.
What?
This pull request stops the
wordpress
Docker image generated bywp-env start
from reaching absurd file sizes.Why?
When ran without the
-l
option,useradd
can cause certain log files the balloon in size. This seems to have something to do with how high theuid
is, but, the option should eliminate the problem.Closes #50934.
How?
We add the
-l
option touseradd
in thewordpress
Dockerfile.Testing Instructions
npx wp-env destroy
.npx wp-env start
.