Docker Command Cheatsheet
Today , I am going to share with you all, some of the commonly used Docker commands.
Docker Cheatsheet:
$ docker version
to know the current docker version$ docker version — format ‘{{.Server.Version}}’
. to get the server version
Docker Container Lifecycle:
$ docker create
creates a container but does not start it$ docker rename
allows the container to be renamed$ docker run
creates and starts a container in one operation$ docker rm
deletes a container$ docker rm -v
delete container and also remove the volumes associated with the container
Starting & Stopping a Docker container
$ docker starts
starts a container so it is running$ docker stop
stops a running container$ docker pause
pauses or suspend a running container$ docker restart
stops and starts a container.$ docker wait
blocks until running container stops$ docker kill
sends a SIGKILL to a running container$ docker attach
will connect to a running container.
Other Docker commands:
$ docker cp
copies files or folders between a container and the local filesystem$ docker export
turns container filesystem into tarball archive stream to STDOUT$ docker history
shows history of image$ docker tag
tags an image to a name (local or registry)$ docker ps
lists all running containers$ docker inspect
looks at all the info on a container (including IP address)
Comments
Post a Comment