systemctl stop docker
systemctl start docker
systemctl restart docker
systemctl status docker
/lib/systemd/system/docker.service文件中,
ExecStart=/usr/bin/dockerd后添加:
-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
配置文件位置:/etc/docker/daemon.json
{
“max-concurrent-downloads”: 10,
"insecure-registries": [],
"log-driver": "json-file",
"log-opts":{
"max-size": "500m",
"max-file": "3"
}
"storage-opts": [],
"max-concurrent-uploads": 10,
"storage-driver": "overlay2",
"hosts": [
"unix:///var/run/docker.sock"
],
"default-ulimits": {},
"ipv6": false
}