- Home
- Skills
- DevOps & Cloud
- Docker Configuration Repair Engineer
Works with the AI Agents you already use
Docker Configuration Repair Engineer
Diagnose and repair failing Dockerfiles, Compose configs, networking, and volume errors with evidence-based fixes.
$29.99
Docker Configuration Repair Engineer
Example session with this skill installed
My node app fails to start in Docker. Logs say 'Error: Cannot find module /app/index.js'. I am using a Dockerfile with a COPY . . command. Help me fix this.
- Read your context and instructions
- Compiled the docker configuration repair
I have analyzed the module resolution failure. This usually indicates a mismatch between the build context, the WORKDIR, and the COPY instruction.
1. Problem Summary
- Failure stage: Container Runtime / Startup
- Expected behavior: Node.js finds and executes index.js at the specified path.
- Actual behavior:
Error: Cannot find module /app/index.js - Environment: Docker Engine (Linux/AMD64 assumed)
2. Root-Cause Analysis
| Rank | Likely cause | Evidence | Confidence | Confirmation |
|---|---|---|---|---|
| 1 | Incorrect WORKDIR | Log path includes /app/ but entrypoint might be looking elsewhere. | High | docker inspect the WorkingDir |
| 2 | .dockerignore exclusion | index.js might be accidentally ignored. | Medium | Check .dockerignore contents |
| 3 | COPY path mismatch | Files copied to a subfolder instead of root. | Medium | ls -R inside the container |
3. Recommended Fix
- File and section:
Dockerfile - Exact change: Ensure
WORKDIR /appis set beforeCOPY . .and that theCMDuses a relative path. - Reason: Explicit workdir setting ensures the relative
COPYtarget andCMDexecution path align.
4. Corrected Configuration (Illustrative)
FROM node:20-slim
WORKDIR /app
# Install dependencies first for better caching
COPY package*.json ./
RUN npm install --only=production
# Copy application source
COPY . .
# Use relative path for entrypoint
CMD ["node", "index.js"]
5. Validation Commands
| Command | What it checks | Expected result |
|---|---|---|
docker build -t app-fix . | Build process | Successful image creation |
docker run --rm app-fix ls -l /app | File presence | index.js visible in /app |
docker run --rm app-fix | Runtime | Application starts without module error |
6. Prevention
Use .dockerignore to specifically include only necessary source files. Always use WORKDIR instead of absolute paths in CMD to maintain portability.
Next steps
- Check your
.dockerignorefile forindex.jsor*.jspatterns. - Verify the
WORKDIRmatches the path in your error log. - Run the validation
lscommand provided above to confirm file locations.
Connects securely to your tools. The creator never sees your data.
About this skill
Containerization failures halt development and break deployment pipelines. Debugging Dockerfiles and Compose configurations often leads to a cycle of "try and see" that leaves images bloated or insecure. This skill provides a systematic approach to diagnosing and fixing container issues, focusing on evidence-based repairs rather than generic re-installs.
What it does
- Failure classification identifies if errors stem from build context, image architecture, networking, or volume permissions.
- Root-cause analysis ranks potential triggers with confidence scores based on logs and environment data.
- Smallest-repair recommendation provides specific file changes to fix the error while preserving existing service names and ports.
- Security hardening replaces risky fixes like privileged mode or root execution with proper UID/GID and volume ownership.
- Validation logic generates precise CLI commands to verify fixes and ensure service readiness.
How it works
- Supply your failing Dockerfile,
docker-compose.yml, or build logs to the agent. - The agent classifies the failure stage, from daemon availability to healthcheck timeouts.
- You receive a structured report ranking likely causes with specific confirmation steps.
- The agent provides the corrected configuration blocks and a validation plan.
Frameworks & tools
Works with Docker Engine, Docker Desktop, Docker Compose, and various CPU architectures. Compatible with standard container workflows including multi-stage builds and container registries.
Why this beats prompting it yourself
Generic prompts often suggest destructive commands like docker system prune or insecure chmod 777 fixes. This skill enforces a safety-first workflow that preserves persistent data and follows container best practices for production-ready configurations.
Use cases
- Debugging "Exit 1" errors in entrypoint scripts or binary execution.
- Fixing networking issues between Compose services using service DNS.
- Correcting volume mount permission denied errors on Linux hosts.
- Optimizing multi-stage builds to reduce image size and fix layer cache issues.
Known limitations
Does not perform live execution of commands. Requires manual input of logs and environment details for accurate diagnosis. Does not handle secrets or private keys.
Cannot execute commands directly. Requires user-provided logs and configs. Does not handle secrets or credentials. Logic limited to Docker and Compose environments.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago