docker run hello-world失败,stderr:权限被拒绝

时间:2019-03-06 13:24:53

标签: docker ubuntu

我已经通过https://get.docker.com/安装了docker,并且运行正常,但是当我尝试运行它时,我收到错误消息

  

docker:未能注册层:ApplyLayer退出状态1标准输出:   stderr:权限被拒绝。

lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

uname -a

Linux stage 4.15.18-1-pve #1 SMP PVE 4.15.18-16 (Mon, 23 Jul 2018 15:59:19 +0200) x86_64 x86_64 x86_64 GNU/Linux

docker版本:

Client:
 Version:           18.09.3
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        774a1f4
 Built:             Thu Feb 28 06:40:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.3
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       774a1f4
  Built:            Thu Feb 28 05:59:55 2019
  OS/Arch:          linux/amd64
  Experimental:     false

码头工人信息:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 18.09.3
Storage Driver: vfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: e6b3f5632f50dbc4e9cb6288d911bf4f5e95b18e
runc version: 6635b4f0c6af3810594d2770f662f34ddc15b40d
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.18-1-pve
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 16GiB
Name: stage
ID: QFBZ:LSOW:2QT3:XGVI:4MIH:5BM7:7XR6:YKC7:JOMO:OWUW:T6YT:KVMA
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

docker -D运行hello-world:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Extracting [==================================================>]     977B/977B
docker: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: permission denied.
See 'docker run --help'.

我没有/ etc / pve / lxc文件夹,也没有lxc命令,因为docker run hello-world still fails, permission denied似乎建议解决此问题。

我对这个错误不知所措,请帮忙!

2 个答案:

答案 0 :(得分:0)

您可能缺少此步骤

sudo usermod -aG docker your-user

并注意这一点:

  

注意:记住要注销并重新登录才能生效!

码头工人告诉stderr: Permission denied

答案 1 :(得分:0)

McAfee防病毒软件正在运行吗?具体来说 isectpd.service(用于Linux威胁防护的McAfee Endpoint Security)。

如果是这样,可能会导致拉动失败。

删除/停止McAfee,然后重试。