Closed
Description
I was running mysql:5.7 with volume mounts and encountered this error:
2017-04-08T00:44:56.022067Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-04-08T00:44:56.022080Z 0 [ERROR] Aborting
I see that we pass the --initialize-insecure
flag in the entrypoint, but the conditions for "initialization" are if $DATADIR/mysql
is empty: https://github.com/docker-library/mysql/blob/master/5.7/docker-entrypoint.sh#L80
According to this reference, --initialize-insecure
will fail if the data directory is nonempty.
So wouldn't this create a race condition if I exit mysql during the initialization process, before the mysql
directory has a chance to be created?
Metadata
Metadata
Assignees
Labels
No labels