clemens
clemens

Reputation: 6813

Invalid bind address format: Connect to remote DOCKER_HOST via ssh from docker in docker

I am trying to use a remote DOCKER_HOST via ssh from a docker-in-docker container, like this:

docker run --rm \
  -e DOCKER_HOST=ssh://<USER>@<HOST> \
  docker:18.06 \
  docker ps

But this returns an error:

Invalid bind address format: ssh://<USER>@<HOST>

If I am not using the docker-in-docker container, it works.

Is it possible to use a remote DOCKER_HOST via ssh?

Upvotes: 0

Views: 1791

Answers (1)

David Maze
David Maze

Reputation: 159373

Docker Engine 18.09 added support for $DOCKER_HOST over ssh. From the Docker 18.09.0 release notes:

Added support for remote connections using SSH docker/cli#1014

Since you're specifying an older docker:18.06 image, it doesn't have this support.

Upvotes: 1

Related Questions