Digital Marketing

How to start a docker container as daemon process

Instead of running docker container with an interactive shell it is also possible to let docker container to run as a daemon which means that the docker container would run in the background completely detached from your current shell. 

$ docker run --name goyun -d centos /bin/sh -c "while true; do sleep 8s; done"

Use docker exec to reattach to your container interactive shell:
$ docker exec -it goyun /bin/bash


Popular posts from this blog

Make online money from the Internet