我正在尝试从其源代码构建一个ManageIQ容器,但我发现这样做时出现了错误。我正在使用以下内容:
sudo docker build -t darga-container-28072016 .并接收到以下错误:
Step 11 : RUN curl -sSLko /etc/yum.repos.d/rhscl-rh-postgresql94-epel-7.repo https://copr-fe.cloud.fedoraproject.org/coprs/rhscl/rh-postgresql94/repo/epel-7/rhscl-rh-postgresql94-epel-7.repo && curl -sSLko /etc/yum.repos.d/ncarboni-pglogical-SCL-epel-7.repo https://copr.fedorainfracloud.org/coprs/ncarboni/pglogical-SCL/repo/epel-7/ncarboni-pglogical-SCL-epel-7.repo
---> Running in 9bca2fce10d7
Cannot start container 9bca2fce10d74375a70250a4ab4c6d3d38cdf510c943e90cab4235400f1b053a: [9] System error: exit status 1我不能100%确定的是我是否应该使用sudo来运行它。我没有试过,我得到了:
Cannot connect to the Docker daemon. Is the docker daemon running on this host?这很奇怪,因为我知道这个服务确实在运行:
$ 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 Thu 2016-08-04 16:13:37 IDT; 12min ago
Docs: http://docs.docker.com
Main PID: 3460 (sh)
CGroup: /system.slice/docker.service
├─3460 /bin/sh -c /usr/bin/docker-current daemon --authorization-plugin=rhel-push-plugin --exec-opt native.cgro...
├─3462 /usr/bin/docker-current daemon --authorization-plugin=rhel-push-plugin --exec-opt native.cgroupdriver=systemd --selinux-enable...
└─3463 /usr/bin/forward-journald -tag docker我应该怎么做,有什么建议吗?谢谢!
发布于 2016-12-01 19:47:58
您需要将用户添加到docker组,以便能够从非root用户使用docker。
如果你想使用1024以下套接字的docker容器,你也必须在dockerroot中。
https://forums.docker.com/t/unable-to-use-docker-without-sudo/8982/2
https://stackoverflow.com/questions/38769236
复制相似问题