Docker container without ipv4 address

Under ubuntu 13.04 with docker 0.7.2 when I create a container via Dockerfile or interactively : the network interface generated veth** does not have an ipv4 address but an ipv6 one.

How can I get a ipv4 address ? Is there some things I missed. Does this depends from my network configuration ?

  • How to connect mysql in a rails app with docker?
  • Pass service params to docker-compose up
  • ERROR: for app no such device
  • Docker maven plugin ClientProtocolException (Windows 10 using Docker Toolbox)
  • creating new SSH keys during docker run
  • Ansible docker_container command failing with no output
  • Same behaviour on a 12.04 box.

  • Node / Express app can't connect to docker mongodb
  • Docker-compose service with --service-ports flag as default
  • Forward host port to docker container
  • Can't access storage account
  • Docker on Windows Server 2016 & microsoft-build-tools
  • Access docker within container on jenkins slave
  • One Solution collect form web for “Docker container without ipv4 address”

    The network interface veth… in the host shouldn’t have an IPv4 address. Those virtual interfaces work in pairs:

    • One interface will be in the container, it will be named eth0, and will have an IPv4 address. For all purposes, it looks like a normal interface.
    • The other half of the pair is the veth… interface. It will be in the host, and won’t have an IPv4 address.

    Those two interfaces are connected together: any packet sent on an interface will appear as being received by the other. You can imagine that they are connected by a cross-over cable, if that helps 🙂

    The fact that the veth… interface has an IPv6 address is just because when IPv6 is enabled, all interfaces receive at least a link-local address. But this address is essentially useless in that case.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.