Difference between revisions of "Docker"

From DUNE
Jump to navigation Jump to search
Line 6: Line 6:
  
 
=Basic Commands=
 
=Basic Commands=
All prepended by "sudo docker":
+
''All prepended by "sudo docker":''
  
 
* images
 
* images
Line 12: Line 12:
 
* ps -a
 
* ps -a
 
* container ls
 
* container ls
 +
 +
The docker system prune command will remove all stopped containers, all dangling images, and all unused networks:
 +
 +
* system prune
  
 
=Restart=
 
=Restart=

Revision as of 23:57, 24 April 2019

Location of Image Files

The contents of the /var/lib/docker directory vary depending on the driver Docker is using for storage. By default this will be aufs but can fall back to overlay, overlay2, btrfs, devicemapper or zfs depending on your kernel support. In most places this will be aufs but the RedHats went with devicemapper.

Basic Commands

All prepended by "sudo docker":

  • images
  • rmi (or rmi -f if simple image delete fails)
  • ps -a
  • container ls

The docker system prune command will remove all stopped containers, all dangling images, and all unused networks:

  • system prune

Restart

sudo service docker restart