码头版本:
Version: 1.12.2
API version: 1.24
Go version: go1.7
Git commit: 8eab29e
OS/Arch: linux/amd64码头信息:
Storage Driver: btrfs
Build Version: Btrfs v4.1.2+20151002
Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Security Options: apparmor
Kernel Version: 4.4.21-68-default
Operating System: SUSE Linux Enterprise Server 12 SP2
OSType: linux
Architecture: x86_64
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/问题:
docker config
/etc/sysconfig/docker
DOCKER_OPTS="--insecure-registry=0.0.0.0/0 --bip=127.12.7.1/24 --ip-forward=false --log-level=debug"
docker run -it --rm busybox /bin/sh如果出现以下错误,它将失败:
docker: 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 0 caused \\\"error running hook: exit status 1, stdout: , stderr: time=\\\\\\\"2016-10-27T20:51:30Z\\\\\\\" level=fatal msg=\\\\\\\"failed to set gateway while updating gateway: route for the gateway 127.12.7.1 could not be found: invalid argument\\\\\\\" \\\\n\\\"\"\n".注意,对于--bip=172.17.0.1/16 (这是默认的),或者如果我删除了--bip选项,就不会出现这样的问题。
有人看过这个或者有什么建议吗?
发布于 2017-11-16 00:49:46
我找到的解决方案是从docker配置中删除此配置。MountFlags=private并重新启动码头服务。
发布于 2017-06-23 18:49:39
选择其他地址。如果地址以127开头,则它是127.0.0.0/8子网的一部分,并且是为回送目的保留的(就像127.0.0.1是localhost一样)。任何其他私人地址都应该有效。
发布于 2016-11-01 01:52:01
你试过重新启动码头吗?
service docker restart它解决了我的问题。
https://unix.stackexchange.com/questions/319409
复制相似问题