Docker Command Cheatsheet
Today , I am going to share with you all, some of the commonly used Docker commands.
Docker Cheatsheet:
$ docker versionto know the current docker version$ docker version — format ‘{{.Server.Version}}’. to get the server version
Docker Container Lifecycle:
$ docker createcreates a container but does not start it$ docker renameallows the container to be renamed$ docker runcreates and starts a container in one operation$ docker rmdeletes a container$ docker rm -vdelete container and also remove the volumes associated with the container
Starting & Stopping a Docker container
$ docker startsstarts a container so it is running$ docker stopstops a running container$ docker pausepauses or suspend a running container$ docker restartstops and starts a container.$ docker waitblocks until running container stops$ docker killsends a SIGKILL to a running container$ docker attachwill connect to a running container.
Other Docker commands:
$ docker cpcopies files or folders between a container and the local filesystem$ docker exportturns container filesystem into tarball archive stream to STDOUT$ docker historyshows history of image$ docker tagtags an image to a name (local or registry)$ docker pslists all running containers$ docker inspectlooks at all the info on a container (including IP address)

Comments
Post a Comment