Docker ERROR ‘Error response from daemon: failed to check bridge interface existence: numerical result out of range’

最近在建立一个Docker网桥的时候遇到这错误…

BUXSQ2RAAFOQC0NW7E4-1024x208 Docker ERROR 'Error response from daemon: failed to check bridge interface existence: numerical result out of range' 技术干货

当然,我是用ansible去做的..具体代码如下所示:

- name: create network
  docker_network:
    name: jupyterhub-network
    driver_options:
      com.docker.network.bridge.name: "rq-research-bridge"
    ipam_options:
      subnet: '172.30.0.0/16'

转换成shell,就应是这行命令:

$ docker network create --subnet 172.30.0.0/16 \
                        --opt com.docker.network.bridge.name=rq-research-bridge \
            jupyterhub-network

shell执行完后就报如下错误:

Error response from daemon: failed to check bridge interface existence: numerical result out of range

身为萌萌的新人…哪见过这问题呀…所以就去问谷歌啦…结果没看到有啥好的资料和解决方法..(怪我读书少咯XD)

自己试了多种方法都不行..后来想了想…换个名字试试..果然可以了..

原因:命令中的字段com.docker.network.bridge.name的值太长,导致docker报500错误

解决方法:将com.docker.network.bridge.name的值设置在15字符以内即可

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Captcha Code

CAPTCHAis initialing...