snap: edit docker configuration

I'd like to configure my docker daemon. To do so, I have to modify the daemon.json file, but unfortunatelly, it's on a filesystem that is mounted read-only;

root@shinwey:/snap/docker/current/config# ls -ltr
total 1
-rw-r--r-- 1 root root 72 Jun 8 22:18 daemon.json
root@shinwey:/snap/docker/current/config# touch daemon.json
touch: cannot touch 'daemon.json': Read-only file system
root@shinwey:/snap/docker/current/config# df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop3 128896 128896 0 100% /snap/docker/471

I tried to play with "snap get docker", as this command deals with configuration, with no success;

root@shinwey:/snap/docker/current/config# snap get docker
error: snap "docker" has no configuration

Is there any specific "snap" command to update an application configuration ?

Any help would be greatly appreciated

1 Answer

mentions that the daemon.json file should be in this folder :

/var/snap/docker/current/etc/docker/daemon.json

or

/var/snap/docker/current/config/daemon.json

to take into account the changes you then need to

sudo snap restart docker

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like