Ubuntu20.04中使用snap安装的docker如何开启远程访问?
转发:https://superuser.com/questions/1431826/expose-api-over-tcp-of-snap-installed-docker-on-ubuntu-18-04
@Rumdex
By running:systemctl status snap.docker.dockerd.service
I was able
to see which was the loaded service file:/etc/systemd/system/snap.docker.dockerd.service
Just looked inside
this file looking for theExecStart
directive. It was there. So just
had to add-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
to
that line, so it ended up looking like:ExecStart=/usr/bin/snap run docker.dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
Rebooted. Works.