SaltyCrane Cheat Sheets — Notes on JavaScript and web development

Docker Cheat Sheet

An image is a read-only template with instructions for creating a Docker container.
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container. A container is a process which runs on a host. ...the container process that runs is isolated in that it has its own file system, its own networking, and its own isolated process tree separate from the host.

Listing

Removing

Pulling images

Publishing images

See also: Get started with Docker - Share you image

Building images from Dockerfiles

Creating containers

Starting / stopping containers

Running containers

docker run is a combination of (optionally) docker pull, docker create, and docker start. See also Docker run reference.

volumes
ports & networking

Interacting with containers

Getting information

* docker-compose commands are shaded in gray. They assume a docker-compose.yml file in the current directory.

See also


  1. Reference: Cloning Docker data volumes. See also: Docker volumes guide: Backup, restore, or migrate data volumes. [back]