Docker Community Forums

Share and learn in the Docker community.

How do I run a docker command from a dind container

(Jkanyuira) #1

I need to run docker inspect on a docker host from a a docker container. I have already started with -v /var/run/docker.sock:/var/run/docker.sock and -v /var/lib/docker/: /var/lib/docker/ . My goal is to use the docker in docker container to monitor the other containers running on the host.


(Benzaita) #2

I believe you simply need to set DOCKER_HOST env var in the container.