docker-wordpress-nginx icon indicating copy to clipboard operation
docker-wordpress-nginx copied to clipboard

Running this two times (to create two individual WordPress Dockers on a host machine) will lead to a conflicting database (due to the static volume and DB name)?

Open Dzhuneyt opened this issue 9 years ago • 1 comments

I noticed that you are mounting the mysql volume and always creating a DB named "wordpress" when this DockerFile is runned. What if I decide to run multiple WordPress installations with separate Dockers on a same host?

They will confluct due to the same DB name in my opinion - "wordpress".

The easiest solution would be to randomize the DB name based on a timestamp or some other mechanism to avoid conflicting names.

Dzhuneyt avatar Jun 18 '15 15:06 Dzhuneyt

No. You should mount different host volumes into the containers. One uniquely for one container instance. Or just not even mount anything into the container. Having multiple mysql daemons work on the same files will most likely destroy your dbs.

levino avatar Jan 22 '16 13:01 levino