This repository was archived by the owner on Jul 28, 2024. It is now read-only.
Run CLI image as UID 33 (Debian's "www-data") #1397
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #1389
The CLI image is based on Alpine where the www-data user is UID 82 while the main WordPress image is based on Debian where www-data stands for UID 33. This causes trouble as files to
/var/www/htmlare attempted to being read and written by different UIDs, depending on whether it's the Apache web server or WP-CLI / our testing code.PR #1388 fixed the user on the
docker-compose.ymllevel but that caused this portion of Dockerfile to become invalid. This PR moves the solution to the Dockerfile level – it explicitly uses "33" instead of "www-data".Some related resources:
(Work on this is part of #1389.)