Docker似乎与Ubuntu16.04中的LXC有一些问题。我根据以下要点删除了LXC:https://gist.github.com/estesp/e37b06e51384fa0ad6067af42a693925
但是现在我得到了
$ docker run --rm busybox date
docker: Error response from daemon: oci runtime error: rootfs_linux.go:42: preparing rootfs caused "permission denied".我不知道从哪里出发才能使用userns-remap特性。
供参考,这是我的docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/docker daemon -H fd:// --userns-remap=Default --graph /media/externaldrive/docker
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
[Install]
WantedBy=multi-user.target发布于 2016-08-18 20:15:36
这是目前的一个bug。正如船坞成员Phil "estesp“所指出的,下面是说
这是一个权限错误,因为对提供的路径图中的现有目录的权限/访问权限更有限。
它现在作为一个bug提交到了码头github问题跟踪器上:
https://github.com/docker/docker/issues/25847
如提交unix.go#L1018中所述
图形目录需要o+x权限才能使停靠器工作。在目录上使用chmod o+x之后,我能够使用userns重新映射。
https://stackoverflow.com/questions/39015494
复制相似问题