Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

376
Visualizações
start docker container interactively

I have a very simple dockerfile with only one row, namely "FROM ubuntu". I created an image from this dockerfile by the command docker build -t ubuntu_ .

I know that I can create a new docker container from this image an run it interactively with the command docker run -it my_new_container

I can later start this new container with the command start my_new container

As I understand it, I should also be able to use this container it interactively by start -i my_new container

But, it does not work. It just runs and exits. I don't get to the container's command prompt as I do when I use run. What am I doing wrong?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You can enter a running container with:

docker exec -it <container name> /bin/bash

example:

docker exec -it my_new_container /bin/bash

you can replace bash with sh if bash is not available in the container.

and if you need to explicitly use a UID , like root = UID 0, you can specify this:

docker exec -it -u 0 my_new_container /bin/bash

which will log you as root

over 4 years ago · Santiago Trujillo Relatório

0

If i understood correctly, you want to see the logs from container in terminal, same as when you run the image with docker run. If that's the case, then try with

docker start -a my_docker_container
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda