Working with Containers:
Command | Description |
docker run <image> | Creates and starts a new container from the specified image |
docker start <container> | Starts a stopped container |
docker stop <container> | Stops a running container |
docker rm <container> | Deletes a stopped container |
docker ps | Lists all running containers |
docker ps -a | Lists all containers (running and stopped) |
docker logs <container> | Displays the logs for a container |
docker exec -it <container> <command> | Executes a command inside a running container |
Working with Images:
Command | Description |
docker pull <image> | Downloads an image from a registry |
docker build <directory> | Builds an image from a Dockerfile |
docker push <image> | Uploads an image to a registry |
docker images | Lists all locally available images |
docker rmi <image> | Deletes a locally available image |
Working with Volumes:
Command | Description |
docker volume create <name> | Creates a new volume |
docker volume ls | Lists all available volumes |
docker volume rm <name> | Deletes a volume |
Working with Networks:
Command | Description |
docker network create <name> | Creates a new network |
docker network ls | Lists all available networks |
docker network rm <name> | Deletes a network |
System Administration:
Command | Description |
docker version | Displays the Docker version |
docker info | Displays system-wide information about Docker |
docker system prune | Deletes all stopped containers, unused networks, and dangling images |
docker system df | Shows the disk usage of Docker components |