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.

  • How to tag a image(.tar) file of docker(container) while loading into other host?
  • docker cannot start on windows
  • docker getaddrinfo ENOTFOUND mysql
  • Pushing a Docker image with gcloud failed
  • nodejs, redis, npm and docker-compose setup
  • Issue while installing Mariadb on mcp8 through Docker
  • 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?

  • How to mix several python scripts into a shell script?
  • is there any way to build non core mvc project on mono?
  • Is it possible to use Docker Toolbox on Visual Studio Code?
  • How to define crontab in docker container with redhat
  • Best place to install antivirus with docker
  • Docker-compose open all ports
  • 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.