Skip to content

Cannot run mariadb docker container as an arbitrary user #304

@lingxiankong

Description

@lingxiankong

I was running mariadb docker container (image mariadb:10.4.12) by specifying --user UID:GID -v /var/lib/mysql:/var/lib/mysql and the ownership of /var/lib/mysql is UID:GID. The command was running as a non-root user, but failed with the error:

2020-05-12 11:16:43+00:00 [Note] [Entrypoint]: Initializing database files
chown: changing ownership of '/var/lib/mysql/data/': Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user.  Check that you have the necessary permissions and try again.

MySQL docker image supports this, see https://hub.docker.com/_/mysql, Running as an arbitrary user.

I also found #59, seems it should support this feature, is there anything I am missing?

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