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 do i execute script in supervisor?
  • Docker mount namespace to share between containers
  • What is the special gitlab-ci-token user?
  • How can I use GPU in Docker image with Theano launched from Windows host?
  • Docker Issue -Image State not getting saved
  • Should I use docker (nginx) for serving a SPA?
  • Same behaviour on a 12.04 box.

  • HTTPS with Docker Containerised Spring Boot App is not working
  • Docker: Error pulling image, executable file not found in $PATH
  • Cannot stop a cloudera/quickstart in Docker
  • Mac OS X Docker baseline aspnet error: libdl not found
  • Apache Tomcat 8 not starting within a docker container
  • Postgres in Docker persistent data
  • 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.