Answers:
由于不断发展的snappy模型中的限制问题,默认情况下Docker并未完全完善(请参阅Snapcraft论坛上的讨论)。
为了获得有关如何解决(即破坏)限制模型直到适当的修复方法的有用指导。您可以简单地检查快照中打包的Docker帮助应用程序。
$ docker.help
Docker snap: Docker Linux container runtime.
Due to the confinement issues on snappy, it requires some manual setup to make docker-snap works on your machine.
We'll take you through the steps needed to set up docker snap work for you on ubuntu core and ubuntu classic.
On Ubuntu classic, before installing the docker snap,
please run the following command to add the login user into docker group.
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
On Ubuntu Core 16, after installing the docker snap from store,
Firstly, you need to connect the two interfaces as they're not auto-connected by default.
sudo snap connect docker:account-control :account-control
sudo snap connect docker:home :home
Secondly, reload the snap and allows the user to login to the new group "docker-snap".
snap disable docker
snap enable docker
newgrp docker-snap
Then have fun with docker in snappy.
最后一条命令失败...
$ newgrp docker-snap
newgrp: group 'docker-snap' does not exist
但是,我没有发现基于故障的任何负面影响,并且Docker现在可以按我预期的那样运行。
Cannot connect to the Docker daemon