我从 hub.docker.com 拉取了最新的 Ubuntu 镜像
$ docker pull ubuntu
一切都正确下载,所以我启动了容器
$ docker run -it ubuntu
我安装snapd
到容器中
# apt update
...
All packages are up to date.
# apt install snapd
Get:1 http://security.ubuntu.com/...
...
done.
当我尝试登录时,出现失败
# snap login
2017/04/20 18:06:04.729212 main.go:220: WARNING: cannot create syslog logger
Email address: <[email protected]>
Password of "[email protected]":
error: cannot communicate with server: Post http://localhost/v2/login: dial unix /run/snapd-snap.socket: connect: no such file or directory
我甚至尝试过sudo
只是为了确定......
# sudo snap login
bash: sudo: command not found
答案1
要让 snapd 在 Docker 容器内工作,需要做的不止这些。在这里查看 Ogra 的容器: https://github.com/ogra1/snapd-docker