Skip to content

Instantly share code, notes, and snippets.

@brthor
Created March 23, 2018 02:41
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brthor/b035052bad98e0a2d7c0e925d2d86a2a to your computer and use it in GitHub Desktop.
Save brthor/b035052bad98e0a2d7c0e925d2d86a2a to your computer and use it in GitHub Desktop.
Docker network create error: "Error response from daemon: failed to check bridge interface existence: numerical result out of range"

I recently hit this problem, while using ansible to create docker networks:

- name: Construct Default docker networks
  shell: "docker network create 
            -o com.docker.network.bridge.enable_icc=false 
            -o com.docker.network.bridge.name={{item.networkName}}
            --subnet {{item.subnet}} {{item.networkName}}"
  with_items: "{{ docker_networks }}"

The error looks like this:

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

The problem is that the name you're passing to com.docker.network.bridge.name is too long.

Change it to be 15 characters or less.

Credit to: https://monkeyray.cc/blog/archives/2017/10/47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment