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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion 10.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# vim:set ft=dockerfile:
FROM debian:jessie

ARG uid=999
ARG gid=999

# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r mysql && useradd -r -g mysql mysql
RUN groupadd -r mysql --gid=${gid} && useradd -r -g mysql --uid=${uid} mysql

# install "pwgen" for randomizing passwords
RUN apt-get update && apt-get install -y pwgen && rm -rf /var/lib/apt/lists/*
Expand Down
6 changes: 4 additions & 2 deletions 10.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim:set ft=dockerfile:
FROM debian:jessie
ARG uid=999
ARG gid=999

# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r mysql && useradd -r -g mysql mysql
RUN groupadd -r mysql --gid=${gid} && useradd -r -g mysql --uid=${uid} mysql

# install "pwgen" for randomizing passwords
RUN apt-get update && apt-get install -y pwgen && rm -rf /var/lib/apt/lists/*
Expand All @@ -12,7 +14,7 @@ RUN mkdir /docker-entrypoint-initdb.d
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB

ENV MARIADB_MAJOR 10.1
ENV MARIADB_VERSION 10.1.12+maria-1~jessie
ENV MARIADB_VERSION 10.1.13+maria-1~jessie

RUN echo "deb http://ftp.osuosl.org/pub/mariadb/repo/$MARIADB_MAJOR/debian jessie main" > /etc/apt/sources.list.d/mariadb.list \
&& { \
Expand Down
4 changes: 3 additions & 1 deletion 5.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim:set ft=dockerfile:
FROM debian:wheezy
ARG uid=999
ARG gid=999

# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r mysql && useradd -r -g mysql mysql
RUN groupadd -r mysql --gid=${gid} && useradd -r -g mysql --uid=${uid} mysql

# install "pwgen" for randomizing passwords
RUN apt-get update && apt-get install -y pwgen && rm -rf /var/lib/apt/lists/*
Expand Down