Reputation: 640
The docker document said that we could run docker in daemon mode by flags -d
. However, I tried to run it in that way in ubuntu
and failed. The process didn't become a daemon process, see the ps aux | fgrep docker
result.
What's the problem?
root 10250 10245 6 08:39 pts/0 00:00:00 /usr/bin/docker -d -H unix:///var/run/docker.sock -H tcp://127.0.0.1:10001
Upvotes: 1
Views: 3336
Reputation: 2179
perhaps more helpfully it is now documented as "detached" mode. the docker daemon is something distinct. This just means the docker process goes to the background and prints it's cid to stdout. What it doesn't do is persist the container if the command being run terminates.
-d, --detach=false Detached mode: run the container in the background and print the new container ID
Upvotes: 0
Reputation: 38237
I tried to run in that way in ubuntu and failed
Do you have the error message it showed? I suspect you ran into a problem with the daemon already running. Once you install Docker to a system, sometimes the installation package automatically starts the daemon for you. The first step should really be to run docker version
and see if it shows you a daemon version as well as the client version.
$ docker version
Client version: 0.7.5
Go version (client): go1.2
Git commit (client): c348c04
Server version: 0.7.5
Git commit (server): c348c04
Go version (server): go1.2
Last stable version: 0.7.6, please update docker
Upvotes: 1