Delete Docker from Docker? Delete Docker from Docker? docker docker

Delete Docker from Docker?


Yes, the easiest way is to mount the docker socket from the host inside the docker container e.g:

$ docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker debian /bin/bashroot@dcd3b64945ed:/# docker ps -qdcd3b64945ed3178d5269041e59d5e37e0f6


Mounting the docker socket is the easiest however its unsecure as gives the root access to everyone who has access to the docker.sock

Id suggest using the Docker Remote API to do the list/start/stop/etc with a program which hides the docker remote ( in your case local ) daemon .

Ref: https://docs.docker.com/articles/basics/