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

  • Marathon won't launch docker container
  • Does Docker support SO_REUSEPORT for kernel 3.9+?
  • Can you efficiently change a lower level Docker container, without rebuilding all the apps that rely on it?
  • Specify runtime for self container .Net Core app in Docker
  • Private Github repositories in dockerized rails application during build
  • 403 Forbidden - Nginx, Docker & Windows
  • 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

  • Multi command with docker in a script
  • Add Docker registry certificate to Docker application on my Mac
  • Microservices in practice
  • How to create a docker base image?
  • docker compose yaml - command
  • How many docker swarm networks can I create
  • 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.