[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571989-105":53,"doc-detail-571989-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","cheat-sheet-docker-cli-dockerfile","Cheat Sheet - docker CLI & Dockerfile","","Concise cheat sheet for Docker command-line usage and Dockerfile-centric workflows. Covers container runtime interaction through the docker command, explaining client, runtime, and registry roles, then listing practical CLI commands by purpose: containers, images, networking, registries, volumes, and the full command set. Includes operational examples for running, logging, inspecting, stopping, removing, and executing processes in containers, plus image build, history checks, tagging, save/load, and push to registries, supported with command syntax and options.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/cheat-sheet-docker-cli-dockerfile/571989/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/cheat-sheet-docker-cli-dockerfile/571989.png","ImageObject",442,249,{"name":88,"@type":89},"Dusta123","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",7,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What is a container image and how does it relate to running containers?","Question",{"text":109,"@type":110},"A container image is a template used to execute containers. Multiple containers can run from the same image while sharing behavior, enabling easier scaling and distribution through a remote registry.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How do you run a container interactively versus detached?",{"text":114,"@type":110},"Use docker run -it to run a container in interactive mode (e.g., starting a bash shell). Use docker run -d to start it in detached mode so it runs in the background.",{"name":116,"@type":107,"acceptedAnswer":117},"What are common docker commands for managing containers and images?",{"text":118,"@type":110},"For containers: docker ps, docker stop, docker rm, and docker exec. For images: docker build, docker history, docker images, docker rmi, docker tag, and docker save/load and docker push.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},571989,1792018097,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":76},962093541925,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","Cheat Sheet: docker CLI & Dockerfile  \nTable of Contents  \nIntroduction 1  \n1. docker CLI 2  \n1.1 Container Related Commands 2  \n1.2 Image Related Commands 4  \n1.3 Network Related Commands 5  \n1.4 Registry Related Commands 6  \n1.5 Volume Related Commands 6  \n1.6 All Related Commands 6  \n2. Dockerfile 6  \nAbout the Authors 8  \nIntroduction  \nContainers allow the packaging of your application (and everything that you need to run it) in a “container image”. Inside a container you can include a base operating system, libraries, files and folders, environment variables, volume mount-points, and your application binaries.  \nA “container image” is a template for the execution of a container — It means that you can have multiple containers running from the same image, all sharing the same behavior, which promotes the scaling and distribution of the application. These images can be stored in a remote registry to ease the distribution.  \nOnce a container is created, the execution is managed by the container runtime. You can interact with the container runtime through the “docker” command. The three primary components of a container architecture (client, runtime, & registry) are diagrammed below:  \nContainer Architecture  \nClient Runtime Registry  \nDaemon  \nImage registry  \n1. docker CLI  \n1.1 Container Related Commands  \ndocker [CMD] [OPTS] [CONTAINER]  \nExamples  \nAll examples shown work in Red Hat Enterprise Linux  \n1. Run a container in interactive mode:  \n\\#Run a bash shell inside an image  \n$ docker run -it rhel7/rhel bash  \n\\#Check the release inside a container  \n[root@   /]\\# cat /etc/redhat-release  \n2. Run a container in detached mode:  \n$ docker run - -name mywildfly -d -p 8080:8080 jboss/wildfly  \n3. Run a detached container in a previously created container network:  \n$ docker network create mynetwork  \n$ docker run - -name mywildfly-net -d - -net mynetwork \\  \n-p 8080:8080 jboss/wildfly  \n4. Run a detached container mounting a local folder inside the container:  \n$ docker run - -name mywildfly-volume -d \\  \n-v myfolder/:/opt/jboss/wildfly/standalone/deployments/ \\  \n-p 8080:8080 jboss/wildflyjboss/wildfly  \n5. Follow the logs of a specific container:  \n$ docker logs -f mywildfly  \n$ docker logs -f [container-name | container-id]  \n6. List containers:  \n\\# List only active containers  \n $ docker ps   \n\\# List all containers  \n $ docker ps -a   \n7. Stop a container:  \n\\# Stop a container  \n $ docker stop [container-name | container-id]   \n\\# Stop a container (timeout = 1 second)  \n $ docker stop -t1   \n8. Remove a container:  \n\\# Remove a stopped container  \n $ docker rm [container-name | container-id]   \n\\# Force stop and remove a container  \n $ docker rm -f [container-name | container-id]   \n\\# Remove all containers  \n $ docker rm -f $(docker ps-aq)   \n\\# Remove all stopped containers  \n $ docker rm $(docker ps -q -f “status=exited”)   \n9. Execute a new process in an existing container:  \n\\# Execute and access bash inside a WildFly container  \n $ docker exec -it mywildfly bash   \nCommand Description  \n| daemon | Run the persistent process that manages containers |\n| --- | --- |\n| attach | Attach to a running container to view its ongoing output or to control it interactively |\n| commit | Create a new image from a container’s changes |\n| cp | Copy files/folders between a container and the local filesystem |\n| create | Create a new container |\n| diff | Inspect changes on a container’s filesystem |\n| exec | Run a command in a running container |\n| export | Export the contents of a container’s filesystem as a tar archive |\n| kill | Kill a running container using SIGKILL or a specified signal |\n| logs | Fetch the logs of a container |\n| pause | Pause all processes within a container |\n| port | List port mappings, or look up the public-facing port that is NATed to the PRIVATE_PORT |\n| ps | List containers |\n| rename | Rename a container |\n| restart | Restart a container |\n| rm | Remove one or more containers |\n| run | Run a comm","cbCaidlwu2VixVM8","https://ap.wps.com/l/cbCaidlwu2VixVM8","pdf",352737,8,"English","# Introduction\n## docker CLI\n### Container Related Commands\n### Image Related Commands\n### Network Related Commands\n### Registry Related Commands\n### Volume Related Commands\n### All Related Commands\n# About the Authors","[{\"question\":\"What is a container image and how does it relate to running containers?\",\"answer\":\"A container image is a template used to execute containers. Multiple containers can run from the same image while sharing behavior, enabling easier scaling and distribution through a remote registry.\"},{\"question\":\"How do you run a container interactively versus detached?\",\"answer\":\"Use docker run -it to run a container in interactive mode (e.g., starting a bash shell). Use docker run -d to start it in detached mode so it runs in the background.\"},{\"question\":\"What are common docker commands for managing containers and images?\",\"answer\":\"For containers: docker ps, docker stop, docker rm, and docker exec. For images: docker build, docker history, docker images, docker rmi, docker tag, and docker save/load and docker push.\"}]","Cheat Sheet - docker CLI & Dockerfile | PDF",1791924886]