0

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?

David Maze
  • 130,717
  • 29
  • 175
  • 215
clemens
  • 6,653
  • 2
  • 19
  • 31

1 Answers1

1

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.

David Maze
  • 130,717
  • 29
  • 175
  • 215