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

365
Vistas
docker run nginx:latest hangs indefinitely

edit: other containers run normally. docker run hello-world works fine.

I am trying to run the latest nginx docker image. It hangs indefinitely. I have tried this on 2 separate fresh install ubuntu virtual machines. I have no idea how to proceed. Any help would be appreciated.

docker run nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
68ced04f60ab: Already exists 
28252775b295: Already exists 
a616aa3b0bf2: Already exists 
Digest: sha256:2539d4344dd18e1df02be842ffc435f8e1f699cfc55516e2cf2cb16b7a9aea0b
Status: Downloaded newer image for nginx:latest
...

...and it hangs at the end.

and some netstat to verify that ports 80 and 443 are free.

sudo netstat -tulpn
[sudo] password for josh: 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      387/systemd-resolve 
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      471/cupsd           
tcp6       0      0 ::1:631                 :::*                    LISTEN      471/cupsd           
udp        0      0 127.0.0.53:53           0.0.0.0:*                           387/systemd-resolve 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           6179/dhclient       
udp        0      0 0.0.0.0:631             0.0.0.0:*                           685/cups-browsed    
udp        0      0 0.0.0.0:46233           0.0.0.0:*                           485/avahi-daemon: r 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           485/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                485/avahi-daemon: r 
udp6       0      0 :::35115                :::*                                485/avahi-daemon: r 
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

When you execute this command docker run nginx:latest you are actually running it in the attached mode which means

  • All the log from stdout and stderr will be printed out on the screen
  • If you exit the command using Ctrl + c or Cmd + c, the container will be stopped.

As a result, it seems like the command hangs because there is no log being printed out anymore.

You can try to run the following command instead

docker run -it -d \
  --name nginx_container \
  -p 80:80 \
  -p 443:443 \
  nginx:latest

Note that this command will create a running nginx container with the name nginx_container running in the background (detached mode). Running this command again will result in the complaint that The container name "/nginx_container" is already in use by container.

To stop and remove that container, run the following command

docker stop nginx_container
docker rm nginx_container
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