0

I'm trying to something with Docker.

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

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
zimi
  • 1,586
  • 12
  • 27

2 Answers2

1

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.

0

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

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.

Community
  • 1
  • 1
Matt
  • 68,711
  • 7
  • 155
  • 158