Command | Description |
docker pull [IMAGE_NAME]:[TAG] | Pull an image from a registry. |
docker images | List all locally available Docker images. |
docker run [OPTIONS] [IMAGE_NAME] [CMD] | Run a Docker container from an image. |
docker ps | List all running containers. |
docker ps -a | List all containers (running and stopped). |
docker stop [CONTAINER_ID] | Stop a running container. |
docker rm [CONTAINER_ID] | Remove a stopped container. |
docker rm $(docker ps -a -q) | Remove all stopped containers. |
docker rmi [IMAGE_ID] | Remove a Docker image. |
docker rmi $(docker images -q) | Remove all Docker images. |
docker-compose up | Create and start containers defined in docker-compose.yml. |
docker-compose up -d | Create and start containers in detached mode. |
docker-compose down | Stop and remove containers defined in docker-compose.yml. |
docker-compose ps | List all containers defined in docker-compose.yml. |
docker-compose logs [SERVICE] | View logs of a specific service. |
docker-compose exec [SERVICE] [COMMAND] | Execute a command inside a running service container. |
docker volume ls | List all Docker volumes. |
docker volume create [VOLUME_NAME] | Create a Docker volume. |
docker volume inspect [VOLUME_NAME] | Display detailed information about a Docker volume. |
docker volume rm [VOLUME_NAME] | Remove a Docker volume. |
docker volume prune | Remove all unused Docker volumes. |
docker network ls | List all Docker networks. |
docker network create [NETWORK_NAME] | Create a Docker network. |
docker network inspect [NETWORK_NAME] | Display detailed information about a Docker network. |
docker network connect [NET_NAME] [CONTAINER_ID] | Connect a container to a Docker network. |
docker network disconnect [NET_NAME] [CONTAINER_ID] | Disconnect a container from a Docker network. |
โEndcard:
๐ Thank you for joining me on this insightful journey into the world of DevOps!
โค If you found this blog helpful and informative, don't forget to give it a like!
๐ Share this valuable knowledge with your friends and colleagues, so they can also benefit from understanding the power of DevOps!
๐ Stay updated with my latest posts and never miss out on exciting content! Click that Follow button to join and stay in the loop!
Follow me on LinkedIn -->abdallah-qamar๐
Stay tuned for Day 21...๐
ย