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
Conversation
Alpine's www-data is UID 82. To make the two images work together, e.g., writes to `/var/www/html` by both Apache and WP-CLI, this image is customized to use UID 33 explicitly (it's user 'xfs' on Alpine Linux). As a result, it's no longer necessary to set the user in docker-compose YAML.
This was referenced Mar 10, 2019
Member
Author
This was referenced Mar 10, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.)