SlideShare a Scribd company logo
Docker Cheat Sheet
Build
Build an image from the Dockerfile in the
current directory and tag the image

docker build -t myimage:1.0 .
List all images that are locally stored with
the Docker Engine

docker image ls
Delete an image from the local image store

docker image rm alpine:3.4
Share
Run a container from the Alpine version 3.9
image, name the running container
“web” and expose port 5000 externally,
mapped to port 80 inside the container.
docker container run --name web -p
5000:80 alpine:3.9
Stop a running container through SIGTERM
docker container stop web
Stop a running container through SIGKILL
docker container kill web
List the networks
docker network ls
Run
List the running containers (add --all to
include stopped containers)
docker container ls
Delete all running and stopped containers
docker container rm -f $(docker ps -aq)
Print the last 100
lines of a container’s logs
docker container
logs --tail 100 web
app* Docker Application
assemble* Framework-aware builds (Docker Enterprise)
builder Manage builds
cluster Manage Docker clusters (Docker Enterprise)
config Manage Docker configs
context Manage contexts
engine Manage the docker Engine
image Manage images
network Manage networks
node Manage Swarm nodes
plugin Manage plugins
registry* Manage Docker registries
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage swarm
system Manage Docker
template* Quickly scaffold services (Docker Enterprise)
trust Manage trust on Docker images
volume Manage volumes
All commands below are called as options to the base
docker command. Run docker <command> --help
for more information on a particular command.
Docker Management
*Experimental in Docker Enterprise 3.0.
Pull an image from a registry
docker pull myimage:1.0
Retag a local image with a new image name
and tag
docker tag myimage:1.0 myrepo/
myimage:2.0
Push an image to a registry
docker push myrepo/myimage:2.0
www.docker.com

More Related Content

What's hot (20)

PDF
Hands-on Helm
Docker, Inc.
 
PPTX
Docker introduction
dotCloud
 
PPTX
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Simplilearn
 
PPSX
Docker Kubernetes Istio
Araf Karsh Hamid
 
PPTX
Docker Basics
DuckDuckGo
 
PDF
Docker Introduction
Jeffrey Ellin
 
PPTX
Kubernetes Security
Karthik Gaekwad
 
PDF
Docker Introduction
Peng Xiao
 
PDF
Getting Started with Kubernetes
VMware Tanzu
 
PPTX
Openstack Magnum: Container-as-a-Service
Chhavi Agarwal
 
PDF
Introduction to docker
Instruqt
 
PDF
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
PPTX
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
PDF
Funny stories and anti-patterns from DevOps landscape
Mikalai Alimenkou
 
PDF
Embracing Observability in CI/CD with OpenTelemetry
Cyrille Le Clerc
 
PDF
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
PDF
Docker 101: Introduction to Docker
Docker, Inc.
 
PDF
Hashicorp Vault: Open Source Secrets Management at #OPEN18
Kangaroot
 
PPTX
Introduction to Helm
Harshal Shah
 
PPTX
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 
Hands-on Helm
Docker, Inc.
 
Docker introduction
dotCloud
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Simplilearn
 
Docker Kubernetes Istio
Araf Karsh Hamid
 
Docker Basics
DuckDuckGo
 
Docker Introduction
Jeffrey Ellin
 
Kubernetes Security
Karthik Gaekwad
 
Docker Introduction
Peng Xiao
 
Getting Started with Kubernetes
VMware Tanzu
 
Openstack Magnum: Container-as-a-Service
Chhavi Agarwal
 
Introduction to docker
Instruqt
 
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Funny stories and anti-patterns from DevOps landscape
Mikalai Alimenkou
 
Embracing Observability in CI/CD with OpenTelemetry
Cyrille Le Clerc
 
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
Docker 101: Introduction to Docker
Docker, Inc.
 
Hashicorp Vault: Open Source Secrets Management at #OPEN18
Kangaroot
 
Introduction to Helm
Harshal Shah
 
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 

Similar to Docker cheat-sheet (20)

PDF
Docker Essentials Workshop— Innovation Labs July 2020
CloudHero
 
PDF
Intersog Hack_n_Tell. Docker. First steps.
Intersog
 
DOCX
Docker Compose user guide
VAIBHAV GUPTA
 
PPTX
Docker Introductory workshop
Runcy Oommen
 
PPTX
DockerSADASDASDA SADASDASDASDASDASDLabs.pptx
MuhamedAhmed35
 
PDF
Docker: A New Way to Turbocharging Your Apps Development
msyukor
 
PPTX
Docker
Amin Arab
 
PDF
Running the Oracle SOA Suite Environment in a Docker Container
Guido Schmutz
 
PPTX
Docker for developers z java
andrzejsydor
 
PPTX
How to _docker
Abdur Rab Marjan
 
PPTX
Primi passi con Docker - ItalianCoders - 12-01-2021
Alessandro Mignogna
 
PDF
Clouds and Tools: Cheat Sheets & Infographics
Thomas Poetter
 
PDF
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
PDF
Savosyuk Stanislav "Docker: Not to Be Confused with a Blue Whale"
LogeekNightUkraine
 
PPTX
Introduction To Docker
Dr. Syed Hassan Amin
 
PPTX
Docker Workshop
Ahmad Rafiee
 
PDF
Managing Docker containers
siuyin
 
PPTX
Docker, LinuX Container
Araf Karsh Hamid
 
POTX
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Swaminathan Vetri
 
PDF
Docker Distributed application bundle & Stack - Overview
Thomas Chacko
 
Docker Essentials Workshop— Innovation Labs July 2020
CloudHero
 
Intersog Hack_n_Tell. Docker. First steps.
Intersog
 
Docker Compose user guide
VAIBHAV GUPTA
 
Docker Introductory workshop
Runcy Oommen
 
DockerSADASDASDA SADASDASDASDASDASDLabs.pptx
MuhamedAhmed35
 
Docker: A New Way to Turbocharging Your Apps Development
msyukor
 
Docker
Amin Arab
 
Running the Oracle SOA Suite Environment in a Docker Container
Guido Schmutz
 
Docker for developers z java
andrzejsydor
 
How to _docker
Abdur Rab Marjan
 
Primi passi con Docker - ItalianCoders - 12-01-2021
Alessandro Mignogna
 
Clouds and Tools: Cheat Sheets & Infographics
Thomas Poetter
 
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
Savosyuk Stanislav "Docker: Not to Be Confused with a Blue Whale"
LogeekNightUkraine
 
Introduction To Docker
Dr. Syed Hassan Amin
 
Docker Workshop
Ahmad Rafiee
 
Managing Docker containers
siuyin
 
Docker, LinuX Container
Araf Karsh Hamid
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Swaminathan Vetri
 
Docker Distributed application bundle & Stack - Overview
Thomas Chacko
 
Ad

Recently uploaded (20)

PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPTX
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
PPTX
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PPTX
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PPT
Testing and final inspection of a solar PV system
MuhammadSanni2
 
PPTX
Knowledge Representation : Semantic Networks
Amity University, Patna
 
PPTX
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
PDF
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
PDF
Digital water marking system project report
Kamal Acharya
 
PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
澳洲电子毕业证澳大利亚圣母大学水印成绩单UNDA学生证网上可查学历
Taqyea
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Testing and final inspection of a solar PV system
MuhammadSanni2
 
Knowledge Representation : Semantic Networks
Amity University, Patna
 
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
Digital water marking system project report
Kamal Acharya
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
Ad

Docker cheat-sheet

  • 1. Docker Cheat Sheet Build Build an image from the Dockerfile in the current directory and tag the image
 docker build -t myimage:1.0 . List all images that are locally stored with the Docker Engine
 docker image ls Delete an image from the local image store
 docker image rm alpine:3.4 Share Run a container from the Alpine version 3.9 image, name the running container “web” and expose port 5000 externally, mapped to port 80 inside the container. docker container run --name web -p 5000:80 alpine:3.9 Stop a running container through SIGTERM docker container stop web Stop a running container through SIGKILL docker container kill web List the networks docker network ls Run List the running containers (add --all to include stopped containers) docker container ls Delete all running and stopped containers docker container rm -f $(docker ps -aq) Print the last 100 lines of a container’s logs docker container logs --tail 100 web app* Docker Application assemble* Framework-aware builds (Docker Enterprise) builder Manage builds cluster Manage Docker clusters (Docker Enterprise) config Manage Docker configs context Manage contexts engine Manage the docker Engine image Manage images network Manage networks node Manage Swarm nodes plugin Manage plugins registry* Manage Docker registries secret Manage Docker secrets service Manage services stack Manage Docker stacks swarm Manage swarm system Manage Docker template* Quickly scaffold services (Docker Enterprise) trust Manage trust on Docker images volume Manage volumes All commands below are called as options to the base docker command. Run docker <command> --help for more information on a particular command. Docker Management *Experimental in Docker Enterprise 3.0. Pull an image from a registry docker pull myimage:1.0 Retag a local image with a new image name and tag docker tag myimage:1.0 myrepo/ myimage:2.0 Push an image to a registry docker push myrepo/myimage:2.0 www.docker.com