simplerisk / docker

SimpleRisk Docker Repository
https://www.simplerisk.com
Mozilla Public License 2.0
29 stars 21 forks source link

Docker container crashes on subsequent runs #37

Closed jgonyea closed 2 years ago

jgonyea commented 2 years ago

Environment:

To reproduce:

Expected result:

Container remains running

Observed behavior:

Container crashes after about 10-15s with the following logs:

 * Starting MySQL database server mysqld
su: warning: cannot change directory to /nonexistent: No such file or directory
   ...done.
 * Starting periodic command scheduler cron
   ...done.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
 * Starting MySQL database server mysqld
su: warning: cannot change directory to /nonexistent: No such file or directory
   ...fail!
sed: no input files

Possible issue

It seems as though the MySQL process is dying due to not having a homedir set for the mysql user.

Suggested Solution

Add a line to the dockerfile to create the expected homedir. I'll submit a PR which seems to rectify this issue.

jsokol commented 2 years ago

Thanks for the contribution, Jeremy! I've asked our Senior DevSecOps Engineer to take a look at this.