Docker for Windows: cannot assign requested address

How can I setup a multi-host running Docker 1.12 on Hyper-V?

I can easily assign a 127.x.x.x ip, but I would like to assign e.g. 10.240.0.x.

  • Mount git branches in a container
  • How to use local docker images in convox?
  • Restoring to a neo4j docker container
  • Docker on Mac: No space left on device
  • Options to use latest docker on centos 6?
  • Postrgesql running on coreos
  • This is my docker-compose.yaml:

    version: '2'
        image: nginx:lastest
          - ""

    If I try to assign I get this error:
    Error starting userland proxy: listen tcp bind: cannot assign requested address

    What am I missing? Do I have to configure Windows to support these addresses?

  • docker build in run time or docker compose from images
  • Private registry authentication while creating pod in Mesosphere
  • Docker Swarm - get services by secret
  • Invalid package version npm
  • Docker Compose Setup in Windows 10 for nginx php-fpm fails with Error
  • php-fpm process hight memory usage, and the host jammed
  • One Solution collect form web for “Docker for Windows: cannot assign requested address”

    Is this using Docker for Windows? With that, you’re limited to binding stuff to localhost on the host.

    If you want to test a multi-node swarm on your machine, you need to set up a separate set of VMs:

    > docker-machine create -d hyperv --hyperv-virtual-switch "Better New Virtual Switch" master
    > docker-machine create -d hyperv --hyperv-virtual-switch "Better New Virtual Switch" worker1
    > docker-machine create -d hyperv --hyperv-virtual-switch "Better New Virtual Switch" worker2

    Init swarm:

    > docker-machine inspect --format '{{ json .Driver.IPAddress }}' master
    > docker-machine ssh master docker swarm init --advertise-addr
    To add a worker to this swarm, run the following command:
        docker swarm join \
        --token SWMTKN-1-4k5ljcmxs1d9q14lth4tfbg868lf8eqi5alxtvgo7s1ptyrhlu-3ihz3bfmx5622vei1smzetudf \

    Add the workers:

    > docker-machine ssh worker1 docker swarm join --token SWMTKN-1-4k5ljcmxs1d9q14lth4tfbg868lf8eqi5alxtvgo7s1ptyrhlu-3ihz3bfmx5622vei1smzetudf
    > docker-machine ssh worker2 docker swarm join --token SWMTKN-1-4k5ljcmxs1d9q14lth4tfbg868lf8eqi5alxtvgo7s1ptyrhlu-3ihz3bfmx5622vei1smzetudf

    SSH into the master and go to town (or use it from the host):

    > docker-machine ssh master
    > docker node ls
     aojoo2h0uuj5hv1c9xajo67o2    worker1   Ready   Active
     eqt1yd8x52gph3axjkz8lxl1z *  master    Ready   Active        Leader

    Details here:

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