File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ MAINTAINER Derek Bourgeois <derek@ibourgeois.com>
5
5
ENV APP_NAME app
6
6
ENV APP_EMAIL app@laraedit.com
7
7
ENV APP_DOMAIN app.dev
8
-
9
- ENV DB_NAME app
10
- ENV DB_PASS secret
11
-
12
8
ENV DEBIAN_FRONTEND noninteractive
13
9
14
10
# upgrade the container
@@ -90,8 +86,15 @@ RUN echo mysql-server mysql-server/root_password password $DB_PASS | debconf-set
90
86
apt-get install -y mysql-server && \
91
87
echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf && \
92
88
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
95
98
VOLUME ["/var/lib/mysql" ]
96
99
97
100
# install composer
You can’t perform that action at this time.
0 commit comments