home / skills / jackspace / claudeskillz / docker-helper
This skill helps you manage and optimize Docker environments with practical commands, best practices, and configurations for containers, images, and
npx playbooks add skill jackspace/claudeskillz --skill docker-helperReview the files below or copy the command above to add this skill to your agents.
---
name: docker-helper
description: Expert helper for Docker containers, Docker Compose, and container optimization
---
# Docker-helper
## Instructions
When helping with Docker tasks:
1. Check running containers: docker ps -a
2. View logs: docker logs -f <container>
3. Inspect container: docker inspect <container>
4. Execute commands: docker exec -it <container> /bin/bash
- Use multi-stage builds to reduce image size
- Order Dockerfile commands by frequency of change
- Use .dockerignore to exclude unnecessary files
- Avoid running as root; create non-privileged users
- Use health checks in docker-compose
- Networking: Check bridge networks and port mappings
- Volumes: Verify volume mounts and permissions
- Build cache: Use --no-cache when needed
- Resource limits: Set memory/CPU limits appropriately
- Use version 3+ syntax
- Leverage environment files (.env)
- Use depends_on with health checks
- Implement restart policies
## Examples
Add examples of how to use this skill here.
## Notes
- This skill was auto-generated
- Edit this file to customize behavior
This skill is an expert helper for Docker containers, Docker Compose, and container optimization. It provides practical troubleshooting steps, best-practice recommendations for Dockerfiles and compose files, and actionable checks for running systems. Use it to speed up debugging, reduce image size, and harden container deployments.
The skill walks through common inspection and remediation commands (container listing, logs, inspect, exec) and suggests targeted fixes based on findings. It recommends build-time and runtime optimizations like multi-stage builds, .dockerignore usage, non-root users, health checks, and resource limits. It also guides compose-level checks for networks, volumes, environment files, and restart/depends_on behavior.
What first command should I run when a container is failing?
Start with docker ps -a to find the container, then docker logs -f <container> for runtime errors and docker inspect <container> for configuration details.
How do I reduce Docker image size quickly?
Use multi-stage builds, remove build tools and caches in the final stage, minimize layers, and add a .dockerignore to trim the build context.