Agent skill

docker-next-config-mounts

Use when asked to fix Docker Compose bind mounts for Next.js config so they mount next.config.mjs (not next.config.js) and avoid the next.config.js/ directory bug.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/docker-next-config-mounts

SKILL.md

Goal: ensure Docker Compose mounts the correct Next.js config file and avoid Docker creating a next.config.js/ directory when a bind source path is missing.

Workflow:

  1. Confirm the repo uses next.config.mjs

    • Check that next.config.mjs exists at the expected path.
  2. Fix compose files

    • Replace mounts of next.config.js with next.config.mjs.
    • Prefer read-only mounts: :ro.
  3. Prevent recurrence

    • Ensure the mounted source file exists in the repo.
    • Optionally add next.config.js/ to .gitignore to prevent accidental commits if it was created previously.
  4. Validate

    • Rebuild or restart dev containers as needed.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results