- Daemonized containers don't have an interactive session and are ideal for running applications and services in the background:
Syntax: docker run -it -d --name <cont_name> <image:tag> <entrypoint>
- We've used the docker run command with the -d flag to tell Docker to detach the container to the background:
# docker run -it -d --name webapp ubuntu:latest /bin/bash
- After that for troubleshooting, if you want to get inside the container, then run the following command:
Syntax: docker attach <container ID/Name>
# docker attach webapp
- To stop a daemonized container we have to run the following command:
# docker ...