Docker Cheat Sheet
Group docker commands into categories.
Image
build Dockerfilecommit container(Create a new image from a container’s changes.)history imageimagesimport url|-inspect container|imageload < file.tarrmi image...save image... > file.tar
Container
cp container:path host_pathcreate image [command [arg...]](Create a container and optionally specify a command. The new container is not started.)diff containerexport containerinspect container|imageport container [private_port[/protocol]]ps(List containers)rm container...run image [command [arg...]](Create a container and run a command. This is equivalent tocreateandstart.)
Container process management
kill container...pause containerrestart container...run image [command [arg...]](Create a container and run a command. This is equivalent tocreateandstart.)start container...stop container...top container [ps options](List processes of a container.)unpause container
Interact with container process
attach container(Interact with the primary processpid 1.)exec container command [arg...](Run a new command in a running container.)logs containerwait container...
Docker Hub
pull name[:tag]push name[:tag]search termtag image[:tag] name[:tag]
Misc
eventsinfologinlogoutversion
