How can i run docker command inside a docker container?

I’m not sure about CoreOS but normally you can manage your host containers from within a container by mounting the Docker socket.

Such as

docker run -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:latest sh -c "apt-get update ; apt-get install docker.io -y ; bash"

or

https://registry.hub.docker.com/u/abh1nav/dockerui/

4 Likes