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

304
Vistas
How can I attach to docker container running in detached mode?

If I start up a docker container in detached mode using the command:

docker run -d ubuntu

the container immediately exits. docker ps -a yields the output (selected columns shown):

CONTAINER ID        IMAGE               COMMAND             STATUS
245fe871a1e3        ubuntu              "/bin/bash"         Exited (0) 4 minutes ago

Is it possible to start the same container (container ID 245fe871a1e3) in interactive mode with a terminal session?

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

0

I'm afraid there's no such a way to archive this. docker attach and docker exec are working against running container only, but if you docker start the container in your case, it'll exited immediately again because the CMD is /bin/bash.

There's also a discussion about this, post some key info here:

It's not possible to enter a stopped container, because the processes are gone, and therefore, the namespaces are gone as well.

about 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