Skip to content

Docker container creates user and chowns datadir causing havoc #641

Closed
@idontusenumbers

Description

@idontusenumbers

The docker container creates a new 'mysql' user and entrypoint.sh chown's the entire data directory to that user.

This causes nothing but trouble when mounting the mysql data directory as a volume using docker-compose. From the host's perspective, all files are owned by uid 999. This is either going to conflict with an existing user or be an unassigned uid.

To make things worse, this behavior is poorly documented and hidden inside docker files and shell scripts.

Be cause of how embedded these commands are, it's difficult to override these actions so it doesn't happen or to 'recover' from them on the host.

What's the goal of these user-related steps?

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions