[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-571990-105":3,"detail-sidebar-cat-1-en-105":81,"doc-detail-571990-en":127},{"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":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","docker-cheat-sheet-quick-reference","Docker Cheat Sheet - Quick Reference","","A practical Docker cheat sheet that consolidates key concepts and frequently used CLI commands. It covers Docker architecture and storage driver options, plus commands for managing images such as listing, inspecting, deleting, and pruning. It also includes Docker build workflows with docker build and Buildx builder creation/selection, along with common build flags and BuildKit-related driver options. Designed as a fast on-the-job reference rather than a full manual.",{"@graph":14,"@context":73},[15,34,56],{"@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-cheat-sheet-quick-reference/571990/",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-cheat-sheet-quick-reference/571990.png","ImageObject",442,249,{"name":42,"@type":43},"Syukur Setiap Hari","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-22","2026-10-13",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What storage driver options does the cheat sheet list for Docker images and layers?","Question",{"text":63,"@type":64},"It lists drivers such as overlay2, fuse-overlayfs, btrfs, zfs, and vfs, along with notes about their behavior (e.g., CoW vs non-CoW).","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How do I list Docker images and filter them by repository tag?",{"text":68,"@type":64},"Use docker images \u003Crepo>:\u003Ctag> where both repo and tag are optional, then apply flags like -a, dangling=true, or label filtering and options such as --digests or --no-trunc.",{"name":70,"@type":61,"acceptedAnswer":71},"How can I build images with docker build and Dockerfile build options?",{"text":72,"@type":64},"Run docker build -t \u003Cimage> \u003Cdir>, optionally using \u003Cimage>:\u003Ctag>. The sheet includes common flags such as --builder, --build-arg, -f \u003Cpath>, and cache controls like --no-cache, --cache-from, and --cache-to.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},571990,1792020281,{"code":4,"msg":82,"data":83},"success",[84,88,93,98,103,108,113,118,123],{"id":85,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":86,"slug":87},11,90,"presentations",{"id":89,"doc_module":22,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},12,"Resumes",80,"resumes",{"id":94,"doc_module":22,"doc_module_name":25,"category_name":95,"show_sort_weight":96,"slug":97},14,"Invoices",70,"invoices",{"id":99,"doc_module":22,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},15,"Posters",60,"posters",{"id":104,"doc_module":22,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},16,"Social Media",50,"social-media",{"id":109,"doc_module":22,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},17,"Forms",40,"forms",{"id":114,"doc_module":22,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},18,"Letters",30,"letters",{"id":119,"doc_module":22,"doc_module_name":25,"category_name":120,"show_sort_weight":121,"slug":122},21,"Paper Templates",5,"papers-templates",{"id":124,"doc_module":22,"doc_module_name":25,"category_name":125,"show_sort_weight":4,"slug":126},158,"General","general-158",{"code":4,"msg":82,"data":128},{"doc_id":79,"user_id":129,"nickname":42,"user_avatar":130,"doc_module":22,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":99,"language":136,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":12,"update_tm":140,"read_time":121},962093541965,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Docker Cheat Sheet Page 1 of 15  \nLast modiﬁed: 2024-04-13  \n© Copyright 2024 Andy Peace— [https://www.andy-pearce.com](https://www.andy-pearce.com)[ ](https://www.andy-pearce.com)Distributed under MIT license— [https://opensource.org/license/mit/](https://opensource.org/license/mit/)  \nArchitecture  \nCopy-onWrite  \n| \u003Cbr>Container |  | \u003Cbr>Container |  | \u003Cbr>Container |\n| --- | --- | --- | --- | --- |\n| R/W layer |  | R/W layer |  | R/W layer |\n| \u003Cbr>Image layer |  |  |  |  |\n| \u003Cbr>Image layer |  |  |  |  |\n| \u003Cbr>Image layer |  |  |  |  |\n| \u003Cbr>Base image layer |  |  |  |  |\n\nStorage Drivers   \nDriver FS Level  \noverlay2 ext4, XFS (ftype=1) File   \nImage fuse-overlayfs Any File  \n(R/O)    \nbtrfs BTRFS Block  \nzfs ZFS on Linux (ZoL) Block  \nvfs Any (no CoW) File  \nImages  \ndocker images \u003Crepo>:\u003Ctag> List all images in \u003Crepo> ﬁltered by \u003Ctag> (both are optional)  \n\n|   -a | Show all images (i.e. include intermediate images) |\n| --- | --- |\n| … -f “dangling=true” | Leaf images with no tags attached (e.g. if removed by later build) |\n| … -f “label=\u003Cvalue>” | Show images with attached label |\n| … --no-trunc | Don’t truncate image IDs |\n| … --digests | Show digests |\n| docker inspect \u003Cimage> | Display detailed information about \u003Cimage> |\n| docker rmi \u003Cimage> | Deletes local image \u003Cimage> |\n| docker image prune | Deletes all dangling local images (i.e. those not used by a named image) |\n|   -a | Also delete unused local images (i.e. those not referenced by a container) |\n| docker history \u003Cimage> | Show the layers used to build a speciﬁed image |\n\nOnly some options are shown, this is not a comprehensive reference. Latest version:  [https://www.andy-pearce.com/docker-cheat-sheet.pdf](https://www.andy-pearce.com/docker-cheat-sheet.pdf)[ ](https://www.andy-pearce.com/docker-cheat-sheet.pdf)Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the USA and other countries.  \nDocker Cheat Sheet Page 2of 15  \nLast modiﬁed: 2024-04-13  \n© Copyright 2024 Andy Peace— [https://www.andy-pearce.com](https://www.andy-pearce.com)[ ](https://www.andy-pearce.com)Distributed under MIT license— [https://opensource.org/license/mit/](https://opensource.org/license/mit/)  \nBuilding  \ndocker build -t \u003Cimage> \u003Cdir> Builds \u003Cimage> using build context \u003Cdir> containing Dockerfile  \n\n| docker build -t \u003Cimage>:\u003Ctag> . | Builds image \u003Cimage> with tag \u003Ctag> using current dir as build context |\n| --- | --- |\n| … --builder \u003Cname> | Use alternative building instance \u003Cname> |\n| … --build-arg \u003Cvar>=\u003Cvalue> | Specify value for parameter declared with ARG in Dockerfile |\n| … -f \u003Cpath> | Look for Dockerfile at \u003Cpath> instead of \u003Cdir>/Dockerfile |\n| … - -no-cache | Bypass the build cache |\n| … --cache-from=\u003Csrc> | Use \u003Csrc> as source for cached images |\n| … --cache-to=\u003Cdst> | After build, exports intermediate images to cache \u003Cdst> |\n|   - -rm | Remove any intermediate containers after successful build |\n| … --secret id=\u003Cid>,src=\u003Cfile> | Exposes \u003Cfile> as secret \u003Cid> to match a type=secret mount |\n| docker buildx create \u003Copts> \u003Cname> | Creates a new builder instance |\n| … - -name \u003Cname> --append | Instead of creating a new builder, append new node to builder \u003Cname> |\n| … --driver \u003Cname> | Use build driver \u003Cname> |\n| … --driver-opt “\u003Copt>=\u003Cval>,…” | Pass driver-speciﬁc options as comma-separated \u003Copt>=\u003Cval> list |\n|   - -use | Also switch to newly-created building, as with docker buildx use |\n| docker buildx use \u003Cname> | Use speciﬁed builder from now on |\n| … --default | Set building as default for current context |\n| … --global | Builder persists even after context is changed |\n| docker buildx ls | Lists existing builder instances, with current one marked with * |\n| docker buildx rm \u003Cname> | Removes the speciﬁed (or current if omitted) builder instance |\n\n\n| Driver | Notes | Auto load\u003Cbr>image | Cache\u003Cbr>export | Tarball\u003Cbr>output | Multi-arch\u003Cbr>images | BuiltKit\u003Cbr>conﬁguration |\n| --- | --- | --- | --- | --- | --- | --- |\n| docker | Uses b","cbCaibTSHzE3WTwT","https://ap.wps.com/l/cbCaibTSHzE3WTwT","pdf",802295,"English","# Architecture\n# Storage Drivers\n# Images\n# Building\n## Docker Build\n## Docker Buildx","[{\"question\":\"What storage driver options does the cheat sheet list for Docker images and layers?\",\"answer\":\"It lists drivers such as overlay2, fuse-overlayfs, btrfs, zfs, and vfs, along with notes about their behavior (e.g., CoW vs non-CoW).\"},{\"question\":\"How do I list Docker images and filter them by repository tag?\",\"answer\":\"Use docker images \\u003crepo\\u003e:\\u003ctag\\u003e where both repo and tag are optional, then apply flags like -a, dangling=true, or label filtering and options such as --digests or --no-trunc.\"},{\"question\":\"How can I build images with docker build and Dockerfile build options?\",\"answer\":\"Run docker build -t \\u003cimage\\u003e \\u003cdir\\u003e, optionally using \\u003cimage\\u003e:\\u003ctag\\u003e. The sheet includes common flags such as --builder, --build-arg, -f \\u003cpath\\u003e, and cache controls like --no-cache, --cache-from, and --cache-to.\"}]","Docker Cheat Sheet - Quick Reference | PDF",1791924886]