-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
wp-env: Fix chown cannot access 'wp-config.php' #30053
wp-env: Fix chown cannot access 'wp-config.php' #30053
Conversation
The needed change to Docker Hub wordpress image has been pushed: docker-library/official-images#9833 This PR can now be merged (as far as I'm concerned). |
bea5e50
to
2aba608
Compare
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.
I did a lot of testing on this, and everything is working very well (both with and without specifying core sources). Thanks for investigating this!
Description
IMPORTANT: Do not merge this until docker-library/wordpress#587 gets pushed to Docker Hub. Update: The change has been pushed to Docker Hub and this PR is safe to merge.
This PR fixes #29814. We used to manually run
chown
onwp-config.php
because Docker Hub Wordpress image would create it with root being the owner, which means we can't accesswp-config.php
with wp cli and that caused problems. The problem with this manual solution was that there was a race condition: After containers start, the files are not actually ready, and if we runchown
before files are copied, the issue #29814 happens.Since the permission problem is now solved at the root, in the Docker Hub image in the aforementioned PR, there's no longer any need for manually doing
chown
, so this PR removes that.How is this tested
EDIT: Now that the Docker Hub image has been updated, this PR can be tested by simply getting it locally and trying
wp-env start
I manually built the WordPress image from the aforementioned PR docker-library/wordpress#587 and used this PR for
wp-env
. If you want to test the same way, it will be necessary to changeFROM
in the Dockerfile to the image that you manually build, that is here:gutenberg/packages/env/lib/init-config.js
Lines 106 to 108 in 8a43a90