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 container stuck after enter in container
  • How to push container to Google Container Registry (unable to create repository)
  • Easiest way to connect with PuTTY to an existing docker container
  • Dump remote MySQL database from a docker container
  • Where does the output for “docker -build” go?
  • Run Jmeter from Jenkins with Docker
  • 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

  • “The headers or library files could not be found for jpeg” installing Pillow on Alpine Linux
  • Committing an interactive container in docker
  • How to use bash with an Alpine based docker image?
  • Docker MySQL: create new user
  • Starting jupyterhub with docker
  • How do I start a php server in the background as a daemon in a docker container
  • 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 127.0.0.1:2375: 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_HOST="tcp://192.168.99.100:2376"
    $env:DOCKER_MACHINE_NAME="default"
    $env:DOCKER_TLS_VERIFY="1"
    $env:DOCKER_TOOLBOX_INSTALL_PATH="C:\\Program Files\\Docker Toolbox"
    $env:DOCKER_CERT_PATH="C:\\Users\\kk580\\.docker\\machine\\machines\\default"
    

    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
    

    Vagrant

    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 https://get.docker.com/ | sudo sh 
    

    Docker

    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.