Home  Docker   Top 10 dock ...

top 10 docker commands

Here are ten essential Docker commands that are frequently used for managing containers and images:

  1. docker run: Start a new container from a Docker image.

    docker run <image_name>
    
  2. docker ps: List running containers.

    docker ps
    
  3. docker images: List local Docker images.

    docker images
    
  4. docker pull: Download a Docker image from a registry.

    docker pull <image_name>
    
  5. docker stop: Stop a running container.

    docker stop <container_id>
    
  6. docker start: Start a stopped container.

    docker start <container_id>
    
  7. docker restart: Restart a running or stopped container.

    docker restart <container_id>
    
  8. docker exec: Run a command inside a running container.

    docker exec -it <container_id> <command>
    
  9. docker rm: Remove one or more stopped containers.

    docker rm <container_id>
    
  10. docker rmi: Remove one or more Docker images.

    docker rmi <image_name>
    
Published on: Jul 01, 2024, 08:11 AM  
 

Comments

Add your comment