Public Repository

Last pushed: 3 years ago
Short Description
My WordPress container that connects to separate MYSQL container
Full Description

Warning do not use yet - will be safe to use when this message is removed

Container created to connect to configured mysql container

starblade/mysql:v2 must be running

docker run --name wordpressDB -e MYSQL_ROOT_PASSWORD=password -d starblade/mysql:v2

docker run --name wordpressWB --link wordpressDB:wpANDmsql -e MYSQL_PORT_3306_TCP=tcp:// -e WORDPRESS_DB_HOST=wordpressDB -e WORDPRESS_DB_PASSWORD=password -P -d starblade/wordpress:v2

The value for "--name" that I am using "wordpressDB" can be changed to what ever you want as long as you change the value for "--link".

I am also so using wpANDmsql for the alias part of the link parameter, ie

[name of database container ---> wordpressDB:wpANDmsql <--- alias]

You will need to get the ip for the MYSQL_PORT_3306_TCP=tcp://

Use docker inspect command on mysql container once up and running or assign your own.

Once wordpress web is up and running set it up the way you want and commit the changes on web and mysql containers.

Please let me know if I made any mistakes or there is a better way to do this.

Hope this helps.
Fly safe Commanders

Docker Pull Command