docker run hello-world 失败,stderr : permission denied

标签 docker ubuntu

我已经通过 https://get.docker.com/ 安装了 docker过程进行得很顺利,但是当我尝试运行它时,我收到了错误

docker: failed to register layer: ApplyLayer exit status 1 stdout: stderr: permission denied.

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

docker 信息:

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 run 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似乎建议解决它。

我对这个错误失去了理智,请帮忙!

最佳答案

你可能错过了这一步

sudo usermod -aG docker your-user

注意这个:

NOTE: Remember to log out and back in for this to take effect!

正如 docker 告诉 stderr: Permission denied

关于docker run hello-world 失败,stderr : permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55024200/

相关文章:

windows - 可以在Win8虚拟机上编写CUDA代码吗?

linux - Linux 上/proc/cpuinfo 中的 bug 是什么意思?

ruby-on-rails - Ubuntu 未检测到 Rails 安装

java - 提交在/workspace 中生成的文件的容器更改(即使使用 makefile)不会持续到图像的新实例中

linux - Ctrl-p 和 Ctrl-n 在 Docker 下的行为异常

installation - 使用devstack安装docker

java - 在 Ubuntu 上从 CMD 安装 Groovy 后未链接的 java jar

java - 找到每个本地 Eclipse 工作区

docker - 如何在 Docker 容器中的 Tomcat 上启用 HTTPS?

java - 如何像这样将 docker-compose 部署到网络上