0

I started a container using the below command connecting to linux server using putty.

docker start -i <containerid>

but I am not able exit from it and get back to command line, without closing the putty.

2
  • You can't exit by pressing ctrl+C or ctrl+D to linux cli? Commented Oct 7, 2021 at 11:20
  • Container has dotnet application and pressing ctrl+c shut downs the application. Ctrl+D also doesn't work. Commented Oct 8, 2021 at 4:27

2 Answers 2

1

you can do from your terminal:

  • exit
  • ctrl+C
  • ctrl+D
Sign up to request clarification or add additional context in comments.

1 Comment

Container has dotnet application and pressing ctrl+c shut downs the application. Ctrl+D also doesn't work. able to type exit but pressing enter has no reaction.
1
  • Start the container docker start <container-id>
  • Set the containers to run in daemon mode docker exec -it -d <container-id> bash or docker exec -d <container-id> bash
  • Enter the running container docker exec -it <container-id> bash
  • Exit the interactive mode by typing exit
  • Type docker ps -a, the container will still be running, to stop it use docker stop <container-id>

Example to quit interactive mode and keep the container alive:

Sample

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.