Docker Commands: A Comprehensive List

Docker is a powerful containerization platform that allows developers to package and deploy their applications in a portable way. However, mastering Docker requires familiarity with a wide range of commands. In this article, we will explore a comprehensive list of Docker commands that can help you manage containers, images, networks, and volumes.

Table of Contents

Docker Commands

  • Process Management

  • Volumes & Ports

    • List volumes

      ⬆ Back to Top

    • Create a volume

      ⬆ Back to Top

    • Delete a volume

      ⬆ Back to Top

    • Show volume metadata

      ⬆ Back to Top

    • Delete all volumes not attached to a container

      ⬆ Back to Top

    • Mount a local directory to your container

      ⬆ Back to Top

    • Copy file or folder from a docker container to host machine

      ⬆ Back to Top

    • Copy file or folder from local machine onto a container

      ⬆ Back to Top

    • Map a local port to a docker instance

      ⬆ Back to Top

    • List the ports a docker container is running on

      ⬆ Back to Top

  • Docker Compose

    • Start your docker-compose defined resources in detached mode

      ⬆ Back to Top

    • Stop all docker-compose resources

      ⬆ Back to Top

    • Destroy all docker-compose resources

      ⬆ Back to Top

    • Show docker-compose processes

      ⬆ Back to Top

    • Show docker-compose logs

      ⬆ Back to Top

    • Show docker-compose resource consumption

      ⬆ Back to Top

  • Images/Repository

    • List available local images

      ⬆ Back to Top

    • Search for docker images

      ⬆ Back to Top

    • Pull a docker image

      ⬆ Back to Top

    • Build an image with a dockerfile

      ⬆ Back to Top

    • Login to a remote repository

      ⬆ Back to Top

    • Push an image to your remote repository

      ⬆ Back to Top

    • Remove a local docker image

      ⬆ Back to Top

    • Show metadata for an image

      ⬆ Back to Top

    • Remove all unused docker images

      ⬆ Back to Top

  • Troubleshooting

    • Show the logs of a container

      ⬆ Back to Top

    • Follow/tail the logs of a container

      ⬆ Back to Top

    • Show timestamps on docker logs

      ⬆ Back to Top

    • Show details/metadata of a container

      ⬆ Back to Top

    • Show a ‘top’ view of processes running on a container

      ⬆ Back to Top

    • Show a ‘top’ view of all docker containers

      ⬆ Back to Top

    • Show any files that have changed since startup

      ⬆ Back to Top

    • Connect to an already running container

      ⬆ Back to Top

    • Execute a command on a container

      ⬆ Back to Top

    • Show docker system wide information

      ⬆ Back to Top

    • Show docker disk space used

      ⬆ Back to Top

Understanding these commands will help you streamline your workflow, improve productivity, and make the most out of Docker’s containerization platform.

If you found value in this article,
you can support us by buying me a coffee! ☕

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *