Benjamin RD
Benjamin RD

Reputation: 12034

docker ps Invalid bind address format:

When I execute the command I get:

$ docker ps
Invalid bind address format: "tcp://192.168.99.100:2376"

$docker-machine rm -f default
$ docker-machine create -d virtualbox default
$ (docker-machine env default)

And now I can't list my docker images and containers. What I can do to fix it?

Upvotes: 12

Views: 24340

Answers (4)

Sachin Thapa
Sachin Thapa

Reputation: 3719

On windows we use SET command. Do following:

  1. Restart docker machine
  2. Run command docker-machine env

  3. Copy variable DOCKER_HOST

  4. Run command SET DOCKER_HOST=tcp://192.xx.xx.xx:2376

This solved problem for us.

Upvotes: 0

Steph
Steph

Reputation: 12222

Another possible solution which worked for me:

DELETE the DOCKER_HOST environment variable and reboot.

Refer to: Docker Issue - Invalid bind address format Windows

Upvotes: 2

sant parkash singh
sant parkash singh

Reputation: 156

Are the quotes part of your $DOCKER_HOST value ? If yes, that may be a problem and you could try to export DOCKER_HOST without quotes and check if it works. Posted by – Christian W Oct 2 '17 at 14:56

This was the problem in my case:

export DOCKER_HOST="tcp://192.xx.xx.xx:2376"

Supposed to be:

export DOCKER_HOST=tcp://192.xx.xx.xx:2376

Upvotes: 14

HVB_DEV
HVB_DEV

Reputation: 11

Simply remove all DOCKER_... entries from your .profile file and add eval $(docker-machine env default) at the end.

If that still gives you an error, reinitialize the docker machine as you did in the question.

Upvotes: 1

Related Questions