Skip to content

Instantly share code, notes, and snippets.

@toniher
Created September 3, 2016 07:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save toniher/e465a45c4406d0e6c5123cf83403010b to your computer and use it in GitHub Desktop.
Save toniher/e465a45c4406d0e6c5123cf83403010b to your computer and use it in GitHub Desktop.
Example of changing uid and gid of a Docker image - MariaDB
FROM mariadb:10.1
# To be changed here
ENV MYSQL_UID 27
ENV MYSQL_GID 27
RUN usermod -u $MYSQL_UID mysql; groupmod -g $MYSQL_GID mysql;
RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment