Files
github-copilot/.github/skills/dockerfile-tester/SKILL.md
T
ВяткинАртём b6eb535e25 fix
2026-04-07 09:33:47 +03:00

56 lines
1.6 KiB
Markdown

---
name: dockerfile-tester
description: "Test, diagnose, and fix Dockerfile and container startup issues. Use when: image does not build, container exits, app is not reachable, docker run fails, docker compose fails, протестируй Dockerfile, образ не работает, контейнер падает, почини Dockerfile, debug docker image, fix container startup."
argument-hint: "Dockerfile path or service to test (for example: Dockerfile, ./api/Dockerfile, compose service name)"
---
# Dockerfile Tester
Tests container build/runtime behavior, diagnoses failures, and applies fixes.
## Procedure
### Step 1 — Preflight
Check Dockerfile paths, copy directives, command/entrypoint, manifests, and
compose configuration (if present).
### Step 2 — Build Test
Run image build and capture first actionable error.
On failure:
1. Diagnose root cause
2. Apply minimal fix
3. Rebuild
### Step 3 — Runtime Test
Run container with minimal required env and verify process startup, logs,
and port/health readiness (if applicable).
### Step 4 — Compose Test
If compose is part of scope, validate and run target service, then check health
and logs.
### Step 5 — Retry Loop
Repeat fix-and-retest up to 3 iterations, then ask user before deeper changes.
## Allowed File Changes
- `Dockerfile`
- `.dockerignore`
- `docker-compose.yml` and overrides
- `.env.example`
- startup scripts needed for container boot
## Reporting
Return:
- stage results (preflight/build/run/compose)
- fixes applied with reasons
- exact commands for build/run/compose
- remaining blockers, if any