Skip to content

Running apache as an arbitrary user gives "bad user name" error #505

Description

I am using:

  • Docker Desktop WSL 2 backend
  • wordpress:php7.4-apache

I have wordpress folder mounted to /var/www/html. Because the files are owned by www-data I can't edit them. I try to run the image as an arbitrary user, but I get apache2: bad user name 1000.

Code for testing purpose:

docker run -d \
--name wordpress \
--mount type=bind,source=/home/adrian/workspace/wordpress,target=/var/www/html \
-e APACHE_RUN_USER=1000 \
-e APACHE_RUN_GROUP=1000 \
wordpress:php7.4-apache

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions