Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow uid and gid to specified on the build command line #50

Closed
wants to merge 2 commits into from
Closed

allow uid and gid to specified on the build command line #50

wants to merge 2 commits into from

Conversation

cfedersp
Copy link

The default mysql uid and gid may conflict with other users on the same host.
Currently, Docker does not allow ownership of files on mounted volumes to be changed.
For hosts that employ mounted volumes, the best way to avoid a uid conflict is to inject a unique id for use when the user is initially created. (other options are to map uids on the host using nfs (limiting) or bindfs (slow perfomance).

This pull request simply adds ARGs to each of the 3 Dockerfiles, allowing the desired uid and gid to specified at build time. If the build-arg is not specified, uid and gid default back to the currently generated value, 999.

Usage Example:

docker build -t and/mariadb-user-fork:10.1.13 --build-arg uid=1001 --build-arg gid=1001 share/and/mariadbfork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants