際際滷

際際滷Share a Scribd company logo
Docker Cheat Sheet
Build
Build an image from the Docker鍖le 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 containers 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 con鍖gs
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 sca鍖old 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
Ad

Recommended

Jenkins CI
Jenkins CI
Viyaan Jhiingade
Docker.pptx
Docker.pptx
balaji257
GitLab螻 Kubernetes襯 牛 CI/CD 蟲豢
GitLab螻 Kubernetes襯 牛 CI/CD 蟲豢
豌蟲 蟾
Docker Overview - Rise of the Containers
Docker Overview - Rise of the Containers
Ryan Hodgin
Kubernetes
Kubernetes
erialc_w
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
Bob Killen
Kubernetes Architecture
Kubernetes Architecture
Knoldus Inc.
Introduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
Ajeet Singh Raina
Introduction to container based virtualization with docker
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
Getting started with Docker
Getting started with Docker
Ravindu Fernando
Introduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
choi sungwook
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep dive
Akash Agrawal
Docker Compose Explained
Docker Compose Explained
Shawn Sorichetti
Ansible presentation
Ansible presentation
Suresh Kumar
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
AddWeb Solution Pvt. Ltd.
Introduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
Kubernetes PPT.pptx
Kubernetes PPT.pptx
ssuser0cc9131
What is Docker
What is Docker
Pavel Klimiankou
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
際際滷Team
Introduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
Docker 101: An Introduction
Docker 101: An Introduction
POSSCON
Docker introduction
Docker introduction
Phuc Nguyen
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
pyrasis
Kubernetes Introduction
Kubernetes Introduction
Martin Danielsson
AMD EPYC Microprocessor Architecture
AMD EPYC Microprocessor Architecture
AMD
Docker Basics
Docker Basics
DuckDuckGo
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!
Docker Essentials Workshop Innovation Labs July 2020
Docker Essentials Workshop Innovation Labs July 2020
CloudHero
Intersog Hack_n_Tell. Docker. First steps.
Intersog Hack_n_Tell. Docker. First steps.
Intersog

More Related Content

What's hot (20)

Introduction to container based virtualization with docker
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
Getting started with Docker
Getting started with Docker
Ravindu Fernando
Introduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
choi sungwook
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep dive
Akash Agrawal
Docker Compose Explained
Docker Compose Explained
Shawn Sorichetti
Ansible presentation
Ansible presentation
Suresh Kumar
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
AddWeb Solution Pvt. Ltd.
Introduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
Kubernetes PPT.pptx
Kubernetes PPT.pptx
ssuser0cc9131
What is Docker
What is Docker
Pavel Klimiankou
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
際際滷Team
Introduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
Docker 101: An Introduction
Docker 101: An Introduction
POSSCON
Docker introduction
Docker introduction
Phuc Nguyen
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
pyrasis
Kubernetes Introduction
Kubernetes Introduction
Martin Danielsson
AMD EPYC Microprocessor Architecture
AMD EPYC Microprocessor Architecture
AMD
Docker Basics
Docker Basics
DuckDuckGo
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!
Getting started with Docker
Getting started with Docker
Ravindu Fernando
Introduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
[螳 襦] 貎覯ろ一るゼ 伎 螳覦蟆 蟲豢ろ - 襦
choi sungwook
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep dive
Akash Agrawal
Docker Compose Explained
Docker Compose Explained
Shawn Sorichetti
Ansible presentation
Ansible presentation
Suresh Kumar
Introduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
Kubernetes PPT.pptx
Kubernetes PPT.pptx
ssuser0cc9131
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation 際際滷 ...
際際滷Team
Introduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
Docker 101: An Introduction
Docker 101: An Introduction
POSSCON
Docker introduction
Docker introduction
Phuc Nguyen
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
貉 覓伎 磯狩蠍: 貉り 豌 60覿企 覯襯 襴 給!
pyrasis
AMD EPYC Microprocessor Architecture
AMD EPYC Microprocessor Architecture
AMD
Docker Basics
Docker Basics
DuckDuckGo
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!

Similar to Docker cheat-sheet (20)

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

Recently uploaded (20)

Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
(Continuous Integration and Continuous Deployment/Delivery) is a fundamental ...
(Continuous Integration and Continuous Deployment/Delivery) is a fundamental ...
ketan09101
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
How to Un-Obsolete Your Legacy Keypad Design
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
Solar thermal Flat plate and concentrating collectors .pptx
Solar thermal Flat plate and concentrating collectors .pptx
jdaniabraham1
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
nnnnnnnnnnnn7777777777777777777777777777777.pptx
nnnnnnnnnnnn7777777777777777777777777777777.pptx
gayathri venkataramani
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
(Continuous Integration and Continuous Deployment/Delivery) is a fundamental ...
(Continuous Integration and Continuous Deployment/Delivery) is a fundamental ...
ketan09101
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
Solar thermal Flat plate and concentrating collectors .pptx
Solar thermal Flat plate and concentrating collectors .pptx
jdaniabraham1
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
nnnnnnnnnnnn7777777777777777777777777777777.pptx
nnnnnnnnnnnn7777777777777777777777777777777.pptx
gayathri venkataramani
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
Ad

Docker cheat-sheet

  • 1. Docker Cheat Sheet Build Build an image from the Docker鍖le 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 containers 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 con鍖gs 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 sca鍖old 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