I have to use systemctl daemon-reload
and systemctl restart docker
after every reboot, then the docker service will use daemon.json file to override default settings.
Ubuntu server 18.04, docker-ce 18.09.7
Is there a way to make this persistent ?
user@host:~$ cat /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
Follow these steps.
This should work as system service/ startup service .
Go into your example, vi /etc/init.d/example then add -
If your commands do the work of over-writing , this will work.
Let me know if you face any challenge as distors do matter.
The default config file used during start up is actually this one: /var/snap/docker/current/config/daemon.json
You can update this file instead.