Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
How can I separate wordpress in backend & frontend with docker container?

I've created two containers for this using the following commands:

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

and, with the command docker inspect test-mysql I can see the containers IP address "IPAddress": "172.17.0.20",

After that, I'm trying to connect it with mysql but I get this 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 should I 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 enter image description here

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You must expose the ports using -p on docker run command. You can map ports from your container to be accessed from your host:

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

The same for wordpress using -p 80:80

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda