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

167
Vistas
How to access wordpress running on a docker container?

There is simply an ubuntu server with docker installed. Pulling wordpress docker image using

`$ docker pull wordpress`.

Then running the container using

$ docker run --name my-wp -p 8080 -h 192.168.1.11 -d wordpress 

Checking the logs:

$ docker logs my-wp
WordPress not found in /var/www/html - copying now...
Complete! WordPress has been successfully copied to /var/www/html
[Mon Mar 30 10:42:10.499346 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 
(Debian) PHP/7.3.16 configured -- resuming normal operations
[Mon Mar 30 10:42:10.499390 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D 
FOREGROUND'

Checking running container and port number:

$ docker ps 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                             NAMES
9a06a4bb7ce5        wordpress           "docker-entrypoint.s…"   22 minutes ago      Up 22 minutes       80/tcp, 0.0.0.0:32769->8080/tcp   my-wp

Now I tried to access wordpress using ip 192.168.1.11:8080 and 192.168.1.11:32769 and 127.0.0.1:8080 and 127.0.0.1:32769. None could open the wordpress page. Note that I already have a webserver running on port 80 on my host OS.

Any ideas on how to access wordpress web page?

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

0

Thanks to David Maze, whose comment helped to realise that port remapping is necessary. With the following command, I map port 80 of the container to port 8080 of the host, and now wordpress is accessible.

$ docker run --name my-wp -p 8080:80 -d wordpress
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