Error in Docker: bad address to executables

I’m trying to something with Docker.

Steps I’m doing:
– Launch Docker Quickstart Terminal
– run docker run hello-world

  • Docker : Why the Commands from Dockerfile were not being executed?
  • Finding Docker container processes? from host point of view
  • Creating Marklogic docker instance in Ubuntu 16.04 exposing the ports
  • How do I display output from Python application running inside Docker container?
  • Connecting to a headless nREPL running in a Docker container from another container
  • Official Dockerfile uses apt-get commands
  • Then I get error like:
    bash: /c/Program Files/Docker Toolbox/docker: Bad address

    I have to say that I was able to run hello-world image, but now I’m not. I don’t know what happend.

    I don’t know if it matters however I had some problems at instalation step.
    Since I have git installed in non standard location. However it seems git bash.exe working correctly for Docker.

    My environment:

    • Windows 10
    • Git 2.5.0 (installed before Docker)
    • Docker Toolbox 1.9.1a

  • How to add native docker-compose to official Jenkins image
  • docker container increase listen queue size beyond 128
  • Sending mail using GNU Mailutils inside Docker container
  • How to setup nginx with docker to work from outside local network
  • Cannot access Google Container Registry from Google Compute Engine
  • Docker container link for mysql to redmine fails with timeout “waiting for database server to accept connections”
  • 2 Solutions collect form web for “Error in Docker: bad address to executables”

    I have the same issue with bash: /c/Program Files/Docker Toolbox/docker: Bad address

    I thought the problems is “bash doesn’t support docker.exe”.

    SO I fix this problem by use powershell ,not the bash.
    and if you use powershell maybe face this

    An error occurred trying to connect: Get http://localhost:2375/v1.21/containers/json: dial tcp ConnectExenter code here
     tcp: No connection could be made because the target machine actively refused it.

    You can export variable from bash use export and import to powershell by this below

    $env:DOCKER_TOOLBOX_INSTALL_PATH="C:\\Program Files\\Docker Toolbox"

    that’s all

    ps:I found this problem fixed by update git from 2.5.0 to 2.6.3.

    Not entirely sure what the issue is, report it to the project on github. I find the docker mac and windows tools a bit flakey from time to time as they are still maturing. If you don’t mind seeing what’s underneath, you can try running docker-machine directly or set up your own host pretty quickly with Vagrant.

    Docker Machine

    Run a command or bash prompt to see what machines you have.

    docker-machine ls

    Create a machine if you don’t have one listed

    docker-machine create -d "virtualbox" default-docker

    Then connect to the listed machine (or default-docker)

    docker-machine ssh default-docker


    If that doesn’t work you can always use vagrant to manage VM’s

    • Install VirtualBox (Which you probably have already if you installed the toolbox)
    • Reinstall Git, make sure you select the option for adding ALL the tools to your system PATH (for vagrant ssh)
    • Install Vagrant

    Run a command or bash prompt

    mkdir docker
    cd docker
    vagrant init debian/jessie64
    vagrant up --provider virtualbox

    Then to connect to your docker host you can run (from the same docker directory you created above)

    vagrant ssh

    Now your on the docker host, Install the latest docker the first time

    curl | sudo sh 


    Now you have either a vagrant or docker-machine host up, you can docker away after that.

    sudo docker run -ti busybox bash

    You could also use PuTTY to connect to vagrant machines instead of installing git/ssh and running vagrant ssh. It provides a nicer shell experience but it requires some manual setup of the ssh connections.

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