Skip to content

Commit

Permalink
Dockerfile: added MYSQL_USER variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Aug 16, 2015
1 parent e2aa62b commit bea36c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM sameersbn/ubuntu:14.04.20150805
MAINTAINER sameer@damagehead.com

ENV MYSQL_USER=mysql

RUN apt-get update \
&& apt-get install -y mysql-server \
&& rm -rf /var/lib/mysql \
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ EOF

# fix permissions and ownership of /var/lib/mysql
mkdir -p -m 700 /var/lib/mysql
chown -R mysql:mysql /var/lib/mysql
chown -R ${MYSQL_USER}:${MYSQL_USER} /var/lib/mysql

# fix permissions and ownership of /run/mysqld
mkdir -p -m 0755 /run/mysqld
chown -R mysql:root /run/mysqld
chown -R ${MYSQL_USER}:root /run/mysqld

#
# the default password for the debian-sys-maint user is randomly generated
Expand Down

0 comments on commit bea36c7

Please sign in to comment.