I'm trying to run docker daemon using command:
docker -d
but I receive in console:
unknown shorthand flag: 'd' in -d
what should I do to run docker daemon?
If you stopped the service, you would need the following command to start it again:
$ sudo service docker start # for work with SysVinit
$ sudo systemctl start docker # for work with Systemd
Also to stopped again, you might use:
$ sudo service docker stop # for work with SysVinit
$ sudo systemctl stop docker # for work with Systemd
I believe the question is how to run the docker in detached mode and connect back, suppose one has Ubuntu image one can try this
sudo docker run -it -d --name myubdocker ubuntu:latest bash
It will detach the docker and one can see it running when one tries this
sudo docker ps
Now how will one attach back to the same docker, thru the following command (CONTAINERID will be listed when one does (docker ps)
sudo docker exec -it <CONTAINERID> bash
This will give a root command prompt ( can one type exit and again connect back )
The -d flag is used with docker run command to run a container in detached mode.
What you're looking for might be docker-machine start :
docker-machine start [arg...]
This command starts a machine with one or more machine names as arguments. For example:
$ docker-machine start dev