Frontend Software Engineer Hire

Basic Docker Commands With Examples

Docker Overview

Encapsulates your deployment artifact, so running on different environments is easier. Most dependencies can be "baked-in" to your Docker container.

Glossary

  • container - a single, running instance of a Docker image.
  • image - the blueprint that helps you stamp out one or more containers.

Common commands

  • docker ps List running containers
  • docker ps -a List all containers, even if not running.
  • docker rm (container name or id) Remove a specific container.
  • docker images List all images present on your system.
  • docker rmi (image name or id) Remove a specific image (only if has no containers created from it).
  • docker run (image name or id) Create a container.
  • docker stop (container name or id) Stop a container.
  • docker start (container name or id) Start a stopped container.

Other Resources