[Workaround] Override docker systemd service

Make config directory for docker service

mkdir -p /etc/systemd/system/docker.service.d/

Add config file for override etc. /etc/systemd/system/docker.service.d/host.conf

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd

Reload systemd

systemctl daemon-reload

Then can use host directive in /etc/docker/daemon.json

{
        "hosts":["unix:///var/run/docker.sock", "tcp://0.0.0.0:2376"],
        "dns": ["8.8.8.8", "1.1.1.1"],
        "tlsverify": true,
        "tls": true,
        "tlscacert": "/etc/ssl/private/docker/docker-ca.pem",
        "tlscert": "/etc/ssl/private/docker/server-cert.pem",
        "tlskey": "/etc/ssl/private/docker/server-key.pem"
}
โซเชียล

Kawin Viriyaprasopsook

System administrator at Zercle Technology Co., Ltd.
System admin กากๆ
รักในการเล่นเกม
ชอบดู Anime ญี่ปุ่น
โซเชียล

Leave a Reply