机器是 CentOS 7 64bit ,依次执行以下命令:
sudo yum install docker
sudo service docker start
sudo docker pull docker.io/owncloud
sudo docker run -d -p 80:80 docker.io/owncloud
然后就挂了:
permission denied
docker: Error response from daemon: Container command could not be invoked
这是怎么回事呢?
1
tomczhen 2016-11-25 14:06:45 +08:00
我也不知道啊,也懒得去搜索,我看干脆就别用 docker 了。:doge:
|
4
htfy96 2016-11-25 14:14:38 +08:00
sudo service docker status
sudo docker info |
5
helloccav OP @htfy96 请帮忙看看
------------------------------------------------------------- > sudo service docker status Redirecting to /bin/systemctl status > docker.service ?.docker.service - Docker Application Container Engine > Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; > vendor preset: disabled) Active: active (running) since Fri > 2016-11-25 06:10:21 UTC; 9min ago > Docs: http://docs.docker.com Main PID: 9372 (docker-current) Memory: 4.3M CGroup: /system.slice/docker.service > ?..9372 /usr/bin/docker-current daemon --exec-opt native.cgroupdriver=systemd --selinux-enabled --log-driver=journald > > Nov 25 06:10:58 ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:58.781315697Z" level=info msg="{Action=create, > Username=centos, LoginUID=1000, PID=9483}" Nov 25 06:10:58 > ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:58.957409994Z" level=info msg="{Action=start, > ID=446352e9d693a372f82c50131d6a990f26f83875edabbe491...=map[80/tcp Nov > 25 06:10:59 ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:59.070870308Z" level=info msg="Config: > &{CommonCommand:{ContainerPid:0 > ID:446352e9d693a372f82c5013...tainers/446 Nov 25 06:10:59 > ip-172-31-14-87 docker-current[9372]: > _MD5=1e01c66b2e67ab3b56a6180ee560fe4c OWNCLOUD_VERSION=9.1.2] Dir: Stdin:<nil> Stdout:<nil> Stderr:<nil> ExtraFiles:[] Sy...il>} Tty:fa > Nov 25 06:10:59 ip-172-31-14-87 docker-current[9372]: permission > denied Nov 25 06:10:59 ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:59.226163049Z" level=warning msg="os: process > already finished" Nov 25 06:10:59 ip-172-31-14-87 > docker-current[9372]: time="2016-11-25T06:10:59.328939351Z" > level=error msg="error locating sandbox id > 643fd6aacc4fcc2b0fdc9b0acb5578238383a4d1... not found" Nov 25 06:10:59 > ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:59.328982573Z" level=warning msg="failed to > cleanup ipc mounts:\nfailed to umount /var/lib/docker/...d argument" > Nov 25 06:10:59 ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:59.329009113Z" level=error msg="Error > unmounting container 446352e9d693a372f82c50131d6a990f26f8387...ot > mounted" Nov 25 06:10:59 ip-172-31-14-87 docker-current[9372]: > time="2016-11-25T06:10:59.329147793Z" level=error msg="Handler for > POST /v1.22/containers/446352e9d693a372f82c50131d6a990...e invoked." > Hint: Some lines were ellipsized, use -l to show in full. ------------------------------------------- > sudo docker info > Containers: 1 Running: 0 Paused: 0 Stopped: 1 > Images: 1 Server Version: 1.10.3 Storage Driver: devicemapper Pool > Name: docker-202:1-50332329-pool Pool Blocksize: 65.54 kB Base > Device Size: 10.74 GB Backing Filesystem: xfs Data file: /dev/loop0 > Metadata file: /dev/loop1 Data Space Used: 802.7 MB Data Space > Total: 107.4 GB Data Space Available: 19.58 GB Metadata Space Used: > 2.175 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.145 GB Udev Sync Supported: true Deferred Removal Enabled: false Deferred Deletion Enabled: false Deferred Deleted Device Count: 0 > Data loop file: /var/lib/docker/devicemapper/devicemapper/data > WARNING: Usage of loopback devices is strongly discouraged for > production use. Either use `--storage-opt dm.thinpooldev` or use > `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this > warning. Metadata loop file: > /var/lib/docker/devicemapper/devicemapper/metadata Library Version: > 1.02.107-RHEL7 (2016-06-09) Execution Driver: native-0.2 Logging Driver: journald Plugins: Volume: local Network: null host bridge > Kernel Version: 3.10.0-327.10.1.el7.x86_64 Operating System: CentOS > Linux 7 (Core) OSType: linux Architecture: x86_64 Number of Docker > Hooks: 2 CPUs: 1 Total Memory: 487.7 MiB Name: ip-172-31-14-87 ID: > JYCC:NTCS:4JXY:ZK6Y:V2V7:DKP4:DGYY:XSYO:3K6K:ICOR:DEGV:GHWQ WARNING: > bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables > is disabled Registries: docker.io (secure) |
6
htfy96 2016-11-25 14:41:40 +08:00
@helloccav 猜测可能你在 OpenVZ 的 VPS 上跑 Docker ? OpenVZ 的 Docker 上面貌似坑比较多,见 https://openvz.org/Docker_inside_CT ,需要更换 storage driver=vfs
或者也有可能是 SELinux 的问题(? |
7
helloccav OP @htfy96
测试了: 1 、在 EC2 的 t2.nano 服务器上运行出错,如主贴所示 ( KVM, 600M 内存) 2 、在 EC2 的 t2.micro 服务器上运行正常 ( KVM, 1G 内存) |
8
haogre 2016-11-25 20:13:57 +08:00 via Android
7 的启动管理归 systemctl 管理了! systemctl enable docker
systemctl start docker 之后试试 |