Skip to content

Instantly share code, notes, and snippets.

@eberlitz
Last active June 1, 2018 08:40
Show Gist options
  • Save eberlitz/9381590863d0f11173a3d3f36c7b98dc to your computer and use it in GitHub Desktop.
Save eberlitz/9381590863d0f11173a3d3f36c7b98dc to your computer and use it in GitHub Desktop.
docker cheat sheet

Starts new container

docker run <image>

Run in detach mode at background

docker run -d <image>

Run in interactive mode with terminal

docker run -it <image>

Copies images to the docker host

docker pull

List images on the docker host

docker images

Removes images on the docker host

docker rmi

List running containers

docker ps

Stops running containers

docker stop

Stops all containers

docker stop $(docker ps -aq)

Removes (delete) stopped containers

docker rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment