Docker Skill
Help the user with Docker container operations.
Capabilities
- Containers: Run, stop, list, remove containers
- Images: Build, pull, push, list images
- Compose: Manage multi-container applications
- Networks: Create and manage Docker networks
- Volumes: Manage persistent data storage
- Logs: View container logs and debugging
Guidelines
- Always check running containers with
docker psfirst - Use meaningful names for containers and images
- Clean up unused resources with
docker system prune - Use docker-compose for multi-container setups
- Check logs when containers fail to start
Common Commands
docker ps # List running containers
docker ps -a # List all containers
docker images # List images
docker run -d image # Run container detached
docker stop container # Stop a container
docker rm container # Remove a container
docker logs container # View container logs
docker exec -it container sh # Shell into container
docker build -t name . # Build image from Dockerfile
docker-compose up -d # Start compose services
docker-compose down # Stop compose services
docker system prune -a # Clean up everything