Enterprise SONiC Bootcamp Register Now

Sign Up

Docker Cheat Sheet

Discover essential Docker commands to enhance your networking skills. Perfect for both beginners and pros,
start exploring now!

Docker Cheat Sheet Commands

Network engineers and system administrators frequently rely on these essential Docker commands for their daily tasks and critical operations.

To assist you, we’ve created a comprehensive Docker Cheat Sheet for your container management tasks. No more searching the internet for Docker commands—everything you need is right here. This cheat sheet will help you perform configuration tasks efficiently, much like other resources such as Kubernetes or Docker Compose Cheat Sheets.

Docker

Images

Docker Hub

Build an Image from a Dockerfile
Build an Image from a Dockerfile without the cache
List local images
Delete an Image
Remove all unused images

Login into Docker
Publish an image to Docker Hub
Search Hub for an image
Pull an image from a Docker Hub

Networking

Volume Commands

List Docker networks
Create a Docker network
Connect a container to a network
Inspect a Docker network

List Docker volumes
Create a Docker volume
Inspect a Docker volume
Remove a Docker volume

Containers

Starting and Stopping

Creates a container but does not start it.
Allows the container to be renamed
Creates and starts a container in one operation
Delete a container
Updates a container’s resource limits
Run a container in the background
Remove a stopped container
Open a shell inside a running container
Fetch and follow the logs of a container
To list currently running containers
List all docker containers (running and stopped)
View resource usage stats

Starts a container so it is running.
Stops a running container.
Stops and starts a container.
Pauses a running container, “freezing” it in place.
Will unpause a running container.
Blocks until running container stops.
Sends a SIGKILL to a running container.
Docker attach will connect to a running container.

Docker

What is Docker?

Docker is an open-source platform designed to automate the deployment, scaling, and management of applications within lightweight, portable containers. Containers are a form of virtualization that bundle an application and its dependencies into a single package, ensuring consistency across various environments from development to production.

Docker Tips

Docker has revolutionized software development and deployment by providing a streamlined approach to containerization. Whether you’re a seasoned developer or a system administrator managing infrastructure, mastering Docker’s tools and shortcuts can greatly improve your workflow efficiency and operational effectiveness

  • Aliases: Use shell aliases (alias d='docker') to shorten commands.
  • Cleanup: Regularly use docker system prune to clean up unused resources.
  • Container Management: Start with docker start, stop with docker rm -f.
  • Image Management: Pull with docker pull, remove with docker rmi.
  • Volumes: List with docker volume ls, prune with docker volume prune.
  • Docker Compose: Start services with docker-compose up, stop with docker-compose down.
  • Inspect: Use docker inspect to examine containers.
  • Networking: List networks with docker network ls.
  • Building Images: Build with docker build -t.
  • Documentation: Refer to Docker Hub and official docs for help.

Incorporating these Docker tips and shortcuts into your daily routine empowers you to optimize workflows, minimize operational overhead, and focus more on developing and delivering resilient applications in containerized environments.

GNS3 Knowledge Base

Discover a wealth of information and expert tips in our GNS3 Knowledge Base, your go-to resource for mastering network simulations. Whether you need detailed tutorials, expert tips, or troubleshooting advice, our Knowledge Base has everything to enhance your skills and solve any challenges. Dive in now to enhance your skills and troubleshoot any challenges with ease!

Share the Knowledge: Spread the Word About Our Docker Cheat Sheet!

If you find this page helpful for your networking knowledge and skills, please consider sharing it with your friends, colleagues, and social media followers. Your support helps us create more valuable resources and enhance our courses.

You can share this page on your social media accounts like Facebook, LinkedIn, Twitter, and any related networking and programming forums or blogs. By sharing, you assist other networking enthusiasts in their learning journey, making their work easier and more efficient. So, if you’d like to help others, kindly share this page.

For more in-depth networking knowledge, visit our route2open courses.

Docker Cheat Sheet!

Simply provide us with your name and email address, and we’ll send you our cheat sheet straight to your inbox