[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-573416-105":3,"detail-sidebar-cat-1-en-105":80,"doc-detail-573416-en":126},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","docker-cheatsheet-essential-commands-for-container-management-and-deployment","Docker Cheatsheet - Essential commands for container management and deployment","","Docker Cheatsheet provides a concise, structured quick reference for core Docker operations, covering container management, image operations, and system monitoring. It explains common workflows such as creating, running, starting, stopping, restarting, pausing, and removing containers, plus inspecting and executing commands inside running containers. It also includes Docker Compose guidance for multi-container applications and registry operations for pushing and pulling images. Setup steps cover Linux installation, Docker Desktop usage, non-root configuration, and verification commands, enabling efficient deployment for beginners and experienced developers.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/docker-cheatsheet-essential-commands-for-container-management-and-deployment/573416/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/docker-cheatsheet-essential-commands-for-container-management-and-deployment/573416.png","ImageObject",442,249,{"name":42,"@type":43},"Stanley","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-18","2026-10-14",true,{"@type":52,"interactionType":53,"userInteractionCount":26},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"How do I verify Docker is installed correctly on Linux?","Question",{"text":62,"@type":63},"After installing Docker and enabling the service, run docker --version and docker run hello-world to confirm the engine works and the test container can execute.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What commands can I use to manage a container’s lifecycle?",{"text":67,"@type":63},"Use docker start, docker stop, docker restart, docker pause, and docker unpause to control the execution state of containers by name.",{"name":69,"@type":60,"acceptedAnswer":70},"How do I build, inspect, and distribute Docker images?",{"text":71,"@type":63},"Build images with docker build (optionally tagging with -t), inspect them using docker images and docker inspect, and distribute them by pulling and pushing via docker pull and docker push.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},573416,1792338177,{"code":4,"msg":81,"data":82},"success",[83,87,92,97,102,107,112,117,122],{"id":84,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":85,"slug":86},11,90,"presentations",{"id":88,"doc_module":22,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},12,"Resumes",80,"resumes",{"id":93,"doc_module":22,"doc_module_name":25,"category_name":94,"show_sort_weight":95,"slug":96},14,"Invoices",70,"invoices",{"id":98,"doc_module":22,"doc_module_name":25,"category_name":99,"show_sort_weight":100,"slug":101},15,"Posters",60,"posters",{"id":103,"doc_module":22,"doc_module_name":25,"category_name":104,"show_sort_weight":105,"slug":106},16,"Social Media",50,"social-media",{"id":108,"doc_module":22,"doc_module_name":25,"category_name":109,"show_sort_weight":110,"slug":111},17,"Forms",40,"forms",{"id":113,"doc_module":22,"doc_module_name":25,"category_name":114,"show_sort_weight":115,"slug":116},18,"Letters",30,"letters",{"id":118,"doc_module":22,"doc_module_name":25,"category_name":119,"show_sort_weight":120,"slug":121},21,"Paper Templates",5,"papers-templates",{"id":123,"doc_module":22,"doc_module_name":25,"category_name":124,"show_sort_weight":4,"slug":125},158,"General","general-158",{"code":4,"msg":81,"data":127},{"doc_id":78,"user_id":128,"nickname":42,"user_avatar":129,"doc_module":22,"category_id":84,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":26,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":22,"language":135,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":12,"update_tm":139,"read_time":4},2336477405376,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","[labex.io](labex.io)  \nDocker Cheatsheet  \nEssential commands for container management and deployment  \nThis cheatsheet provides a quick reference to fundamental Docker operations, commands, and best practices, ideal for both beginners and experienced developers for efficient container management and deployment.  \nContainer Management  \nCreate, run, and control containers  \nImage Operations  \nBuild, manage, and distribute images  \nSystem Monitoring  \nInspect and troubleshoot containers  \nDocker Compose  \nMulti-container application management  \nRegistry Operations  \nPush, pull, and share images  \nInstallation & Setup  \nLinux Installation  \nInstall Docker on Ubuntu/Debian systems.  \n\\# Update package manager sudo apt update  \n\\# Install prerequisites  \nsudo apt install apt-transport-[https](https) ca-certificates curl software-properties-common  \n\\# Add Docker's official GPG key  \ncurl-fsSL [https://download.docker.com/linux/ubuntu/gpg](https://download.docker.com/linux/ubuntu/gpg)[ ](https://download.docker.com/linux/ubuntu/gpg)[| sudo apt-key add-](| sudo apt-key add-)  \n[\\# Add Docker repository](# Add Docker repository)  \nsudo add-apt-repository \"deb [arch=amd64] [https://download.docker.com/linux/ubuntu](https://download.docker.com/linux/ubuntu) bionic stable\"  \n\\# Install Docker  \nsudo apt update && sudo apt install docker-ce  \n\\# Start Docker service  \nsudo systemctl start docker  \nsudo systemctl enable docker  \nWindows & macOS  \nInstall Docker Desktop for GUI-based management.  \n\\# Windows: Download [Docker Desktop from docker.com](Docker Desktop from docker.com)  \n\\# macOS: Use Homebrew or download [from docker.com](from docker.com)[ ](from docker.com)[brew install--cask docker](brew install--cask docker)  \n[\\# Or download directly from:](# Or download directly from:)  \n\\# [https://www.docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop)  \nPost-Installation Setup  \nConfigure Docker for non-root usage and verify installation.  \n\\# Add user to docker group (Linux) sudo usermod-aG docker $USER  \n\\# Log out and back in for group changes  \n\\# Verify Docker installation docker--version  \ndocker run hello-world  \nDocker Compose Installation  \nInstall Docker Compose for multi-container applications.  \n\\# Linux: Install via curl sudo curl-L  \n\"[https://github.com/docker/compose/releases/download](https://github.com/docker/compose/releases/download)[ ](https://github.com/docker/compose/releases/download)[/v2.24.0/docker-compose-$](/v2.24.0/docker-compose-$)( [uname-s](uname-s))[-$](-$)( [uname](uname)-m)\" -o /usr/local/bin/docker-compose  \nsudo chmod +x /usr/local/bin/docker-compose  \n\\# Verify installation docker-compose--version  \n\\# Note: Docker Desktop includes Compose  \nBasic Docker Commands  \nEssential commands to get started with Docker containers and images.  \n01  \nSystem Information: `docker version` / `docker system info`  \nCheck Docker installation and environment details.  \n\\# Display Docker version information docker version  \n\\# Show system-wide Docker information  \ndocker system info  \n\\# Display help for Docker commands docker help  \ndocker \u003Ccommand> --help  \n02  \nRunning Containers: `docker  \n`  \nrun  \nCreate and start a container from an image.  \n\\# Run a container interactively docker run-it ubuntu:latest bash \\# Run container in background (detached)  \ndocker run-d--name my-container nginx  \n\\# Run with port mapping docker run-p 8080:80 nginx  \n\\# Run with auto-removal after exit docker run--rm hello-world  \n03  \nList Containers: `docker ps`  \nView running and stopped containers.  \n\\# List running containers docker ps  \n\\# List all containers (including stopped)  \ndocker ps-a  \n\\# List container IDs only docker ps-q  \n\\# Show latest created container docker ps-l  \nContainer Management  \nContainer Lifecycle: `start` / `stop` / `restart`  \nControl container execution state.  \n\\# Stop a running container docker stop container_name  \n\\# Start a stopped container docker start contain","cbCainjb0N6BwIsM","https://ap.wps.com/l/cbCainjb0N6BwIsM","pdf",125615,"English","# Installation & Setup\n## Linux Installation\n## Windows & macOS Installation\n## Post-Installation Setup\n# Basic Docker Commands\n## System Information\n## Running Containers\n## List Containers\n# Container Management\n## Container Lifecycle\n## Execute Commands\n## Container Removal\n## Container Logs\n# Image Management\n## Building Images\n## Image Inspection\n# Registry Operations\n## Pull and Push Images","[{\"question\":\"How do I verify Docker is installed correctly on Linux?\",\"answer\":\"After installing Docker and enabling the service, run docker --version and docker run hello-world to confirm the engine works and the test container can execute.\"},{\"question\":\"What commands can I use to manage a container’s lifecycle?\",\"answer\":\"Use docker start, docker stop, docker restart, docker pause, and docker unpause to control the execution state of containers by name.\"},{\"question\":\"How do I build, inspect, and distribute Docker images?\",\"answer\":\"Build images with docker build (optionally tagging with -t), inspect them using docker images and docker inspect, and distribute them by pulling and pushing via docker pull and docker push.\"}]","Docker Cheatsheet - Essential commands for container management and deployment | PDF",1791939397]