标签:not builder field 日志 redhat 描述 bin jenkin invalid
- 启动Docker容器时遇到错误
docker, docker run, docker start,
Docker version 1.12.6, build 1398f24/1.12.6
[root@localhost jenkins]# cat /proc/version
Linux version 3.10.0-514.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Nov 22 16:42:41 UTC 2016
[root@localhost jenkins]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@localhost jenkins]#
我在Share PC上运行Docker, Share PC不能上外网
[root@localhost ~]# docker run centos /bin/echo ‘Hello World‘
container_linux.go:247: starting container process caused "process_linux.go:334: running prestart hook 1 caused \"error running hook: exit status 1, stdout: , stderr: \""
/usr/bin/docker-current: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:334: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: \\\"\"\n".
该问题是由于设置了Docker代理引起的.
设置Docker代理如下:
# following link is to resolve docker-runc not found issue,proxy is not necessary *#
ln -s /usr/libexec/docker/docker-proxy-current /usr/bin/docker-proxy
ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc
# 设置代理
sudo HTTP_PROXY=http://135.251.33.16:80 /usr/bin/dockerd --userland-proxy=false &
我尝试了Disable SELinux
修改配置文件需要重启机器:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
不成功.
然后我试图停止由代理启动(sudo HTTP_PROXY命令)的docker服务: service docker stop
显示停止成功,但是实际没有成功.
最后我重启Share PC.
重启后,启动Docker: service docker start.
就可以正确运行docker了:
[root@localhost ~]# docker run centos /bin/echo ‘Hello World‘
Hello World
[root@localhost ~]#
其他:
我现在担心是不是在创建Dockerfile并build时,是否需要
Docker问题日志--工作中遇到的问题及解决
标签:not builder field 日志 redhat 描述 bin jenkin invalid
原文地址:http://www.cnblogs.com/Rong-/p/7518870.html