从git构建ManageIQ容器时出错

时间:2016-08-04 13:49:28

标签: docker containers

我正在尝试从其源代码构建一个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或不使用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

我应该在这做什么指示? 谢谢!

1 个答案:

答案 0 :(得分:0)

您需要将用户添加到docker组,才能使用非root用户的docker。

如果你想使用1024以下套接字的docker容器,你也必须使用dockerroot。

https://forums.docker.com/t/unable-to-use-docker-without-sudo/8982/2