This content originally appeared on DEV Community and was authored by Tek Bahadur Kshetri
Here I am going to write about removing docker images, volumes and containers. To do so, first of all, you need to shutdown the docker container.
docker-compose down
After that, you can follow following method to remove required things,
# To remove all the containers
docker rm -f $(docker ps -a -q)
# To remove all the docker images
docker rmi -f $(docker images -a -q)
# To remove all the volumes
docker volume rm $(docker volume ls -q)
# To delete everything
docker system prune -a --volumes
This content originally appeared on DEV Community and was authored by Tek Bahadur Kshetri
Tek Bahadur Kshetri | Sciencx (2022-05-13T03:08:29+00:00) Docker remove all image, volume, container. Retrieved from https://www.scien.cx/2022/05/13/docker-remove-all-image-volume-container/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.