fix(install): Update Dockerfile for mysql connection issue (#92)

if the pid of mysqld after reboot equal to before it will need to delete the /run/mysqld/mysqld.sock
This commit is contained in:
flukehn 2021-07-27 17:09:06 +08:00 committed by GitHub
parent 480202a9b9
commit 2b3cfc0df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-b
#Install environment and set startup script #Install environment and set startup script
RUN cd uoj/install/bundle && sh install.sh -p && echo "\ RUN cd uoj/install/bundle && sh install.sh -p && echo "\
#!/bin/sh\n\ #!/bin/sh\n\
rm -rf /run/mysqld/*\n\
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld\n\ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld\n\
if [ ! -f \"/var/uoj_data/.UOJSetupDone\" ]; then\n\ if [ ! -f \"/var/uoj_data/.UOJSetupDone\" ]; then\n\
cd /opt/uoj/install/bundle && sh install.sh -i\n\ cd /opt/uoj/install/bundle && sh install.sh -i\n\