To delete all containers including its volumes use,
docker rm -vf $(docker ps -a -q)
To delete all the images,
docker rmi -f $(docker images -a -q)
Remember, you should remove all the containers before removing all the images from which those containers were created.
In case you are working on Windows (Powershell),
$images = docker images -a -q
foreach ($image in $images) { docker image rm $image -f }
bind volume
docker run -v host_foler:absolute_path_of_foler_in_image image_name
如何查运行中的container:
# find ID of your running container:
docker ps
# create image (snapshot) from container filesystem
docker commit 12345678904b5 mysnapshot
# explore this filesystem using bash (for example)
docker run -t -i mysnapshot /bin/bash
There are multiple ways to achieve that: