How i can separate wordpress in backend & frontend with docker container?

enter image description here

I’ve created two containers for this usign the follows command:

docker run --detach --name=test-mysql --env="MYSQL_ROOT_PASSWORD=mypassword" mysql

and, with the command docker inspect test-mysql i can see the ip container "IPAddress": "172.17.0.20",

After that, im trying to connect it with mysql but i have the error:

can't connect to MySQL server on '172.17.0.20' (60) 

but if i do, docker exec -it test-mysql bash i can connect it.

If i want to connect a front end for a wordpress to this mysql container, how i can do it?

i tried with docker run --detach --name test-wordpress --link test-mysql:mysql wordpress but is not working and i have nothing in localhost:80

Read more here: How i can separate wordpress in backend & frontend with docker container?

Leave a Reply

Your email address will not be published. Required fields are marked *