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.

  • Only first line being read in Dockerfile
  • Docker + GNOME + tightvncserver + noVNC
  • Dockerfile build - possible to ignore error?
  • How do I run multiple commands within a Docker container in Jenkins?
  • Ember in docker with nginx can't reach server container
  • Laradock + Webpack + Hot-reload
  • 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?

  • Make Docker for mac listen on a tcp port
  • Access non-IP interface in docker container
  • Gitlab CI runner configuration with cache on docker
  • Set hostname of service container to host's hostname
  • Running several apps via docker-compose
  • how to create docker image from an ISO file?
  • 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.