docker logs <container_id>
docker logs -n 10000 <container_id> # Show the last lines of the logs
docker logs --since=60m <container_id> # Show logs for last hour
docker logs --until=60s <container_id> # Show logs for next minute
docker system df # Disk usage
docker system df --verbose # Disk usage
docker images # Show images
docker images -f dangling=true # List dangling images
docker volume ls # Show volumes
sudo du -d 1 -h # Disk usage of volume directory
docker system prune # Clean up any images, containers, volumes, and networks that are dangling
docker builder prune # Remove build cache
docker container prune # Remove all stopped containers
docker image prune # Remove all dangling images
docker image prune -a # Remove all dangling images not referenced by any container
docker rmi $(docker images -f dangling=true -q) # Remove dangling images
docker volume prune # Remove all volumes not used by at least one container
docker network prune # Remove all networks not used by at least one container
docker-compose up # Start all containers, volumes, images, and networks in docker-compose.yml file
docker-compose up -d # Start container detached
docker-compose up -d --remove-orphans # Clean up orphan containers
docker-compose down # Stop and remove all containers, volumes, images, and networks in docker-compose.yml file
docker-compose down -v # Remove named volumes declared in the volumes section of the compose file and anonymous volumes attached to containers
docker-compose start # Start services
docker-compose stop # Stop services
docker-compose pause # Pause services
docker-compose unpause # Resume services
docker-compose restart # Restart services
docker-compose rm # Remove stopped containers
docker-compose pull # Pull images
docker-compose build # Rebuild a service if you change a service's dockerfile or the contents of its build directory
docker-compose ps # List containers deployed from a docker-compose.yml file
docker-compose images # List images in a docker-compose.yml file
docker-compose logs # View logs from running containers
docker-compose top # Display resource usage of containers
docker-compose config # Validate and view a docker-compose.yml file