I’m only starting with Docker.
I observed Docker’s behaviour of which I’m not sure whether it is expected.
- I start a container in an interactive mode (-i) with a terminal (-t);
- I execute
docker attach <container_id>;
- I’m in the container’s terminal executing commands;
- I type
exitto go back to host’s shell;
- The container is no longer running.
I’m not sure why would exiting a container’s terminal stop the whole container. I would be grateful for advice on how to be able to exit containers’ terminals without stopping them.