curl -O https://raw.githubusercontent.com/SoraKumo001/docker-tls/master/docker-tls.sh
sudo bash docker-tls.sh DNS:host.example.com,IP:10.1.1.1
- Server keys
- /etc/docker/certs/ca.pem
- /etc/docker/certs/server-key.pem
- /etc/docker/certs//server-cert.pem
- Client keys
- ~/.docker/ca.pem
- ~/.docker/cert.pem
- ~/.docker/key.pem
- /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --tlsverify --tlscacert=/etc/docker/certs/ca.pem --tlscert=/etc/docker/certs/server-cert.pem --tlskey=/etc/docker/certs/server-key.pem -H tcp://0.0.0.0 -H fd:// --containerd=/run/containerd/containerd.sock
sudo systemctl daemon-reload
sudo systemctl restart docker
docker --tls -H server-address ps