Agent skill
docker-testing
Guidance for running and debugging tests in Docker environments for FastAPI + Vue/Tailwind projects.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/docker-testing
SKILL.md
Docker Testing Skill
Use this skill whenever you need to run the project’s test suite or diagnose issues inside Docker containers. It provides a summary of common commands and troubleshooting steps.
Running the test suite
- Build and start services: Use
docker compose -f docker/docker-compose.yaml up --buildto build all images and start the services in development mode. - Run backend tests: Execute
docker compose -f docker/docker-compose.yaml exec backend python -m pytestto run the backend test suite. - Run frontend tests: For frontend unit tests, run
docker compose -f docker/docker-compose.yaml exec frontend npm run testor use the appropriate Vitest command. - Check logs: View logs for all services with
docker compose -f docker/docker-compose.yaml logs -for for a specific service withdocker compose -f docker/docker-compose.yaml logs -f backendorfrontend. - Stop services: Shut down all running containers with
docker compose -f docker/docker-compose.yaml down. Include the-vflag to remove volumes for a clean start.
Troubleshooting tips
- Port conflicts: If services fail to start, check that the default ports (backend 8000, frontend 8080) are free. Modify port mappings in the compose file if necessary.
- Database issues: Ensure that the database service is healthy by running
docker compose -f docker/docker-compose.yaml psand looking for the “(healthy)” status. Checkdocker compose -f docker/docker-compose.yaml logs dbfor errors. - API connection errors: Test the backend directly with
curl http://localhost:8000/docsto confirm it’s running. Verify the Nginx configuration inclient/nginx.confif the frontend cannot reach/api/*endpoints.
Best practices
- Run tests in a clean environment. Stop containers and remove volumes if you suspect stale state.
- Use relative paths and environment variables. Avoid hard‑coded host dependencies so your setup is portable.
- When debugging, read container logs before rerunning tests. This saves time and surfaces issues like missing migrations or syntax errors.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?