utilshub light mode logo

Docker Cheatsheet

A beginner-friendly Docker cheatsheet to easily reference essential Docker commands for container management, image handling, and more.

Favorites

    No Data Found

    No results found

Container Management

  • docker ps

    List running containers

  • docker start <container>

    Start a container

  • docker stop <container>

    Stop a running container

  • docker restart <container>

    Restart a container

  • docker rm <container>

    Remove a stopped container

  • docker exec -it <container> <command>

    Execute a command in a running container

  • docker logs <container>

    Fetch logs from a container

  • docker inspect <container>

    Return low-level information on a container

Image Management

  • docker images

    List Docker images

  • docker rmi <image>

    Remove an image

  • docker build -t <image>:<tag> <path>

    Build an image from a Dockerfile

  • docker pull <image>

    Pull an image from a registry

  • docker push <image>

    Push an image to a registry

  • docker tag <image>:<tag> <new_image>:<new_tag>

    Tag an image

Network Management

  • docker network ls

    List all networks

  • docker network create <network>

    Create a new network

  • docker network rm <network>

    Remove a network

  • docker network inspect <network>

    Inspect a network

Volume Management

  • docker volume ls

    List all volumes

  • docker volume create <volume>

    Create a new volume

  • docker volume rm <volume>

    Remove a volume

  • docker volume inspect <volume>

    Inspect a volume

Docker Compose

  • docker-compose up

    Start services defined in a docker-compose.yml file

  • docker-compose down

    Stop and remove containers defined in a docker-compose.yml file

  • docker-compose logs

    View logs from services defined in a docker-compose.yml file

  • docker-compose ps

    List containers for a service defined in a docker-compose.yml file

Docker Cheat Sheet Overview

This Docker Cheat Sheet is a powerful reference tool designed to help you quickly recall essential Docker commands. It is crucial for managing your containers, handling images, and orchestrating your Docker environment effectively. With just a glance, you can access the commands that enhance your container management workflow.

Understanding Docker Commands

Docker commands are the building blocks of container management. They allow you to create, modify, and manage your Docker containers and images efficiently. This cheat sheet is particularly useful for both beginners and experienced developers, providing a quick reference to essential commands that streamline your development process.

Key Features of the Docker Cheat Sheet

Comprehensive Command List: Access various Docker commands.
Quick Reference: Find commands quickly, save time.
Best Practices: Learn effective Docker usage strategies.
Collaboration Tools: Use Docker for sharing and management.

Benefits of Using the Docker Cheat Sheet

  • Improve Docker skills with essential commands.
  • Boost productivity by saving command search time.
  • Beneficial for new learners and experienced developers.
  • Compatible with various development environments.
  • Updated with latest Docker features and practices.

How to Use the Docker Cheat Sheet

  1. Know the cheat sheet layout for quick access.
  2. Read command descriptions for usage details.
  3. Use commands in terminal to practice.
  4. Bookmark for easy future reference.
  5. Share with team for consistent practices.

Related Tools