Yet another attempt
This commit is contained in:
@@ -17,7 +17,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
|
|||||||
COPY /etc/ /etc/
|
COPY /etc/ /etc/
|
||||||
|
|
||||||
# Setting up MySQL --Will come back to later, as it's not necessary and not playing very well with automation
|
# Setting up MySQL --Will come back to later, as it's not necessary and not playing very well with automation
|
||||||
RUN mysql -u root --verbose < mysql_setup.sql
|
RUN mysql_setup.sh
|
||||||
|
|
||||||
# Copying in startup script
|
# Copying in startup script
|
||||||
COPY /entrypoint.sh /
|
COPY /entrypoint.sh /
|
||||||
|
|||||||
20
mysql_setup.sh
Normal file
20
mysql_setup.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
mysql_secure_installation << EOF
|
||||||
|
|
||||||
|
y
|
||||||
|
Password1234
|
||||||
|
Password1234
|
||||||
|
y
|
||||||
|
y
|
||||||
|
y
|
||||||
|
y
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#UPDATE mysql.user SET authentication_string=PASSWORD('Password1234') WHERE User='root';
|
||||||
|
#DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
|
||||||
|
#DELETE FROM mysql.user WHERE User='';
|
||||||
|
#DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
|
||||||
|
#FLUSH PRIVILEGES;
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
UPDATE mysql.user SET authentication_string=PASSWORD('Password1234') WHERE User='root';
|
|
||||||
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
|
|
||||||
DELETE FROM mysql.user WHERE User='';
|
|
||||||
DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
|
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
Reference in New Issue
Block a user