Skip to content

Commit 9171716

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

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile

+6-9
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,12 @@ RUN echo mysql-server mysql-server/root_password password $DB_PASS | debconf-set
8686
apt-get install -y mysql-server && \
8787
echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf && \
8888
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf
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
89+
RUN mysql -h --user="root" --password="secret" -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
90+
mysql -h --user="root" --password="secret" -e "CREATE USER 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret';" && \
91+
mysql -h --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
92+
mysql -h --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION;" && \
93+
mysql -h --user="root" --password="secret" -e "FLUSH PRIVILEGES;" && \
94+
mysql -h --user="root" --password="secret" -e "CREATE DATABASE homestead;"
9895
VOLUME ["/var/lib/mysql"]
9996

10097
# install composer

0 commit comments

Comments
 (0)