The Docker command Line Complete Referenece

Spread the Knowledge

Docker Commands – First Commands

CommandDescription
infoDisplay system-wide information
versionShow the Docker version information

Docker Commands – Working with Containers

CommandDescription
attachAttach local standard input, output, and error streams to a running container
cpCopy files/folders between a container and the local filesystem
createCreate a new container
diffInspect changes to files or directories on a container’s filesystem
execRun a command in a running container
inspectReturn low-level information on Docker objects
killKill one or more running containers
pausePause all processes within one or more containers
portList port mappings or a specific mapping for the container
psList containers
renameRename a container
restartRestart one or more containers
rmRemove one or more containers
runRun a command in a new container
startStart one or more stopped containers
stopStop one or more running containers
unpauseUnpause all processes within one or more containers
updateUpdate configuration of one or more containers
waitBlock until one or more containers stop, then print their exit codes

Docker Commands – Monitoring Containers

CommandDescription
logsFetch the logs of a container
psList containers
statsDisplay a live stream of container(s) resource usage statistics
topDisplay the running processes of a container
eventsGet real time events from the server

Docker Commands – Working with Image

CommandDescription
buildBuild an image from a Dockerfile
commitCreate a new image from a container’s changes
exportExport a container’s filesystem as a tar archive
historyShow the history of an image
imagesList images
importImport the contents from a tarball to create a filesystem image
inspectReturn low-level information on Docker objects
loadLoad an image from a tar archive or STDIN
rmiRemove one or more images
saveSave one or more images to a tar archive (streamed to STDOUT by default)
tagCreate a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Docker Commands – Working with Registry/Repository

CommandDescription
loginLog in to a Docker registry
logoutLog out from a Docker registry
pullPull an image or a repository from a registry
pushPush an image or a repository to a registry
searchSearch the Docker Hub for images

Docker Commands – Management Commands

CommandDescription
configManage Docker configs
containerManage containers
imageManage images
networkManage networks
nodeManage Swarm nodes
pluginManage plugins
secretManage Docker secrets
serviceManage services
swarmManage Swarm
systemManage Docker
trustManage trust on Docker images
volumeManage volumes
Rajesh Kumar
Latest posts by Rajesh Kumar (see all)