创建文件夹和文件
mkdir /etc/systemd/system/docker.service.d
vi /etc/systemd/system/docker.service.d/docker.conf
插入以下内容:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -D --tls=true --tlscert=/var/docker/server.pem --tlskey=/var/docker/serverkey.pem -H tcp://192.168.59.3:2376
重启服务
systemctl daemon-reload
systemctl restart docker