docker on ubuntu 16.04启动容器时出现OCI错误

时间:2017-02-21 01:31:37

标签: docker

以下命令docker run -d ubuntu /dev/null 返回以下错误

docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"/dev/null\": permission denied".

这是我的操作系统信息

$cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

这是我的码头信息

~$ docker info
Containers: 9
 Running: 0
 Paused: 0
 Stopped: 9
Images: 2
Server Version: 1.13.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 24
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-62-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.34 GiB
Name: dataflow
ID: 67BS:7WGB:VWCL:2MP7:3W4W:O3VY:UR6R:BYZG:FSL7:U4CV:5M2O:PYAQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

1 个答案:

答案 0 :(得分:1)

期待发生了什么?

你试图将/dev/null作为一个没有意义的命令运行。当然,尝试执行字符设备会给你一个“权限被拒绝”的错误。