Come out from running container

Hello @Ayman ,

when i ran command in your lab on topics on docker this → docker run -it centos bash
but when i want to come out of it from without exit the container shell by ctrl + p and ctrl + q keys press it says stays on page or leave on page please help me in this

Hello, @anu
You have to use -d option to make it your container running in the background.
docker run -itd centos bash
or use –name flag to provide name to the container.

docker run --name test -itd centos bash

access container :—

docker exec -it test bash

To exit from the container type in the terminal “exit” or press ctrl + D
I don’t think so ctrl + p or ctrl + q will work.

@Tej-Singh-Rana thank you very much