forked from FASSt-simulation/simulation_containers
-
Notifications
You must be signed in to change notification settings - Fork 3
Helpful Docker Commands
Shawn P. Serbin edited this page Oct 6, 2022
·
9 revisions
You can cleanup (prune) your environment to remove any images that are unused by taking up space on your computer
To cleanup unused images:
docker image prune
You can also remove specific images. E.g. First do
docker image ls
Then identify the ID of the image to remove, e.g. 2bb301e6a312
you can then delete by doing
docker image rm -f 2bb301e6a312
To cleanup old volumes:
docker volume prune
You can remove any containers you aren't using, however (warning!!) this would remove your ELM or Jupyter containers if not running:
docker container prune
You can cleanup everything at once using:
docker system prune
The docker system prune command is a shortcut that prunes images, containers, and networks. Volumes are not pruned by default, and you must specify the --volumes
flag for docker system prune to prune volumes, e.g.
docker system prune --volumes