Skip to content

Commit 19c68e5

Browse files
author
Derek Bourgeois
committed
Update Dockerfile
1 parent 406db38 commit 19c68e5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Dockerfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ MAINTAINER Derek Bourgeois <derek@ibourgeois.com>
55
ENV APP_NAME app
66
ENV APP_EMAIL app@laraedit.com
77
ENV APP_DOMAIN app.dev
8-
9-
ENV DB_NAME app
10-
ENV DB_PASS secret
11-
128
ENV DEBIAN_FRONTEND noninteractive
139

1410
# upgrade the container
@@ -90,8 +86,15 @@ RUN echo mysql-server mysql-server/root_password password $DB_PASS | debconf-set
9086
apt-get install -y mysql-server && \
9187
echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf && \
9288
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf
93-
RUN echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';" | mysql && \
94-
echo "CREATE DATABASE homestead;" | mysql
89+
RUN mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
90+
service mysql restart && \
91+
mysql --user="root" --password="secret" -e "CREATE USER 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret';" && \
92+
mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
93+
mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
94+
mysql --user="root" --password="secret" -e "FLUSH PRIVILEGES;" && \
95+
mysql --user="root" --password="secret" -e "CREATE DATABASE homestead;" && \
96+
service mysql restart && \
97+
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root --password=secret mysql
9598
VOLUME ["/var/lib/mysql"]
9699

97100
# install composer

0 commit comments

Comments
 (0)