安装/ proc时,Docker rootfs_linux.go权限被拒绝

时间:2017-10-09 11:57:57

标签: docker meteor-up

我正在使用meteor-up部署到LXD容器内的docker实例。当它尝试启动MongoDB docker实例时,它会因以下错误而失败:

docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\\"proc\\\" to rootfs \\\"/var/lib/docker/vfs/dir/20a621a73755db3f4030bc67bbf7ff9540bd1d63bb348d8be440d8ca63d3c922\\\" at \\\"/proc\\\" caused \\\"permission denied\\\"\"".

我尝试将ubuntu用户部署到我的LXD容器,并且root,这没有帮助。这里显然有一些权限问题,但我不知道从哪里开始调试这个问题。

2 个答案:

答案 0 :(得分:4)

根据https://discuss.linuxcontainers.org/t/having-trouble-using-docker/383,您可能需要设置security.nesting=true。停止容器(lxc stop deploy-container),在lxc config set deploy-container security.nesting true上按https://insights.ubuntu.com/2015/10/30/nested-containers-in-lxd)和lxc start deploy-container配置嵌套。

答案 1 :(得分:0)

对于 Proxmox 用户:https://www.youtube.com/watch?v=79KiCBNbsbg

在容器上启用 Nesting 功能以修复以下错误

ERROR: for mysql-8.0  Cannot start service mysql-8.0:
failed to create shim: OCI runtime create failed:
container_linux.go:380: starting container process caused: process_linux.go:545:
container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at
"/proc" caused: mount through procfd: permission denied: unknown

但其他用户 Proxmox users say 也启用 keyctl

如果您仍然有错误,您可能需要从 docker-compose 配置中删除 domain_namehostname 以修复以下错误,如 here 所述。

ERROR: for mariadb10-4  Cannot start service mariadb10-4: failed to create shim: OCI runtime create failed: container_linux.go:380:
starting container process caused: process_linux.go:545:
container init caused: write sysctl key kernel.domainname:
open /proc/sys/kernel/domainname: permission denied: unknown