Error setting up docker on Windows

I am trying to set up docker machine on Windows and this problem has annoyed me for a few days.

I downloaded and installed DockerToolbox-1.9.1a on my Windows, so it came with Virtual Box version 5.0.10. After that I ran this command to create my virtual machine:

  • Docker-compose and Docker-swarm
  • Bootstrapping docker deamon
  • How to connect my nodeApp with another NodeApp running on Docker?
  • Configure Nginx as reverse proxy for Couchdb
  • Mounting (possibly corrupt) docker partitions with devicemapper
  • How to run Iojs in Docker?
  • docker-machine create –driver virtualbox –engine-insecure-registry docker.pre-prod.ss.local:5000 –virtualbox-hostonly-cidr 192.168.99.100/24 mymachine

    Here is what I got:

    Waiting for machine to be running, this may take a few minutes…
    Machine is running, waiting for SSH to be available… Detecting
    operating system of created instance… Detecting the provisioner…
    Provisioning created instance… Copying certs to the local machine
    directory… Copying certs to the remote machine… Setting Docker
    configuration on the remote daemon… WARNING >>> This machine has
    been allocated an IP address, but Docker Machine could not reach it
    successfully.

    SSH for the machine should still work, but connecting to exposed
    ports, such as the Docker daemon port (usually :2376), may not
    work properly.

    You may need to add the route manually, or use another related
    workaround

    This could be due to a VPN, proxy, or host file configuration issue.

    You also might want to clear any VirtualBox host only interfaces you
    are not using

    The machine was created successfully. So I ran the docker-machine env command:

    docker-machine env –shell=powershell mymachine| Invoke-Expression

    and I got:

    Error running connection boilerplate: Error checking and/or
    regenerating the certs: There was icates for host
    “192.168.99.100:2376”: dial tcp 192.168.99.100:2376: connectex: No
    connection target machine actively refused it. You can attempt to
    regenerate them using ‘docker-machine regenerate-certs name’. Be
    advised that this will trigger a Docker daemon restart which will stop
    running containers.

    Running docker version returned

    Client: Version: 1.9.1 API version: 1.21 Go version:
    go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC
    2015 OS/Arch: windows/amd64 An error occurred trying to connect:
    Get http://localhost:2375/v1.21/version: dial tcp connection could be
    made because the target machine actively refused it.

    Can someone help to point out the direction to fix this issue? It is really troublesome to set up docker on Windows. Thank you very much.

  • RabbitMQ doesn't respects Docker memory limits
  • Installing packages for Rstudio Docker
  • Django models foreign key not recognizing 'QueryString' BaseObject
  • Use docker for day to day development with Rails
  • insufficient_scope error with docker registry v2 and curl
  • Can't alter admin user password for PostgreSQL in Docker
  • One Solution collect form web for “Error setting up docker on Windows”

    I use docker 1.9.1 on Windows (7, 8 and even 10), but without docker registry, and without using --virtualbox-hostonly-cidr.

    If you are to use that last option, check “Set a specific address ip when i create a docker container”, where I mention issue 1709, which uses cidr in .1, not .100 (but getting a .100 ip address as a result):

    docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.99.1/24" m99
    

    If there’s no other machine with the same cidr (Classless Inter-Domain Routing), the machine should always get the .100 IP upon start.

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