Docker Basics
Executing commands directly on the Container
docker exec -it <container> bash -c 'rm -rf /tmp/.*'
Running Jupyter Notebooks in a Container
docker volume create jupyter-notebooks
docker run -p 8888:8888 --name notebooks -e JUPYTER_ENABLE_LAB=yes --volume=jupyter-notebooks:/home/jovyan/work jupyter/datascience-notebook
Note: Only Notebooks saved inside work directory will be persistent.
Destructive Command
docker system prune --all --volumes --force
docker builder prune
docker builder prune --all
Mapping of overlay2 Folders to exact RepoDigest information
$ docker image inspect $(docker image ls -q) --format ' -> ' | sed 's|/merged||g'
To Remove all Log Files
$ find /var/lib/docker/containers/ -type f -name “*.log” -delete