======================================== sudo service docker stop
sudo docker daemon -H tcp://0.0.0.0:2375
======================================== getting >>>
leonidas@ubuntu:~ sudo docker daemon -H tcp://0.0.0.0:2375
docker: 'daemon' is not a docker command.
See 'docker --help'
leonidas@ubuntu:~
Do you have any idea/hint on what to do??? I search online but Not found a solution…
The binary is called dockerd and is located in /usr/bin/dockerd.
Why would they want to stop docker as a service and then run it with a command? Strange exercise…
I would strongly suggest to do any daemon configuration to the file /etc/docker/daemon.json. If it does not exist, create it.The equivalent of what you try to do with the command is:
{
"hosts" : [ "tcp://0.0.0.0:2375" ]
}
If the file exists, do not replace it with the example I pasted! Modify the hosts line if existing, add the hosts line , if missing. Keep in mind: this is a json file!
Though, you might want to keep the binding to the docker.sock as well:
Then restart the daemon with sudo service docker restart and you are done.
WARNING: everyone who can access your docker machine, will be able to connect to it with a remote docker client or application that implements the docker sdk without authentification. You will not want to enable this, unless you enable certificate auth (see: https://docs.docker.com/engine/security/https/). Even better don’t enable the http socket at all, and leverage docker context, which allows to controll remote docker engines over ssh (see: Docker context problem).
So daemon was the old name… ?
I must use dockerd for the new version of docker?
I use in Ubuntu VM the docker practicing commands of this book
This VM is for testing, so is Not any danger to impacted or attack me, some hacker to the Windows 10 host OS, correct?
leonidas@ubuntu:~$ sudo dockerd -H tcp://0.0.0.0:2375
INFO[2020-10-30T12:28:21.007042504-07:00] Starting up
WARN[2020-10-30T12:28:21.007960408-07:00] [!] DON’T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON’T KNOW WHAT YOU’RE DOING [!]
INFO[2020-10-30T12:28:21.009620669-07:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2020-10-30T12:28:21.011635635-07:00] parsed scheme: “unix” module=grpc
INFO[2020-10-30T12:28:21.011734670-07:00] scheme “unix” not registered, fallback to default scheme module=grpc
INFO[2020-10-30T12:28:21.011785495-07:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2020-10-30T12:28:21.011809428-07:00] ClientConn switching balancer to “pick_first” module=grpc
INFO[2020-10-30T12:28:21.014896413-07:00] parsed scheme: “unix” module=grpc
INFO[2020-10-30T12:28:21.015010625-07:00] scheme “unix” not registered, fallback to default scheme module=grpc
INFO[2020-10-30T12:28:21.015065269-07:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2020-10-30T12:28:21.015081620-07:00] ClientConn switching balancer to “pick_first” module=grpc
INFO[2020-10-30T12:28:21.028942240-07:00] [graphdriver] using prior storage driver: overlay2
WARN[2020-10-30T12:28:21.035451449-07:00] Your kernel does not support swap memory limit
WARN[2020-10-30T12:28:21.035486087-07:00] Your kernel does not support cgroup rt period
WARN[2020-10-30T12:28:21.035491493-07:00] Your kernel does not support cgroup rt runtime
WARN[2020-10-30T12:28:21.035499364-07:00] Your kernel does not support cgroup blkio weight
WARN[2020-10-30T12:28:21.035504413-07:00] Your kernel does not support cgroup blkio weight_device
INFO[2020-10-30T12:28:21.035631782-07:00] Loading containers: start.
INFO[2020-10-30T12:28:21.136500755-07:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2020-10-30T12:28:21.177144086-07:00] Loading containers: done.
INFO[2020-10-30T12:28:21.196087060-07:00] Docker daemon commit=4484c46d9d graphdriver(s)=overlay2 version=19.03.13
INFO[2020-10-30T12:28:21.196150156-07:00] Daemon has completed initialization
INFO[2020-10-30T12:28:21.213806949-07:00] API listen on [::]:2375