om-dev-container-maintenance

Audits, diagnoses, and fixes VS Code Dev Container configuration drift for Open Mercato.

1.7k|382|Updated Sep 10, 2025
One-click install
npx skills add https://github.com/open-mercato/open-mercato --skill om-dev-container-maintenance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: om-dev-container-maintenance
Source: https://github.com/open-mercato/open-mercato/tree/main/.ai/skills/om-dev-container-maintenance
Command: npx skills add https://github.com/open-mercato/open-mercato --skill om-dev-container-maintenance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Dev container setups drift out of sync with the regular development environment as Node.js versions, services, environment variables, and build steps evolve, causing broken builds, failing health checks, and "works locally but not in the container" bugs.

Core Features & Use Cases

  • Drift Auditing: Runs a structured checklist comparing versions, service parity, env var rewrites, package volumes, ports, and build sequences between the regular setup and .devcontainer/ files.
  • Failure Diagnosis: Troubleshoots container build failures, service health check failures, postCreateCommand step errors, and runtime issues like hot reload or OOM crashes.
  • Guided Fixes with Doc Sync: Applies minimal fixes to the correct file and mandates updating .devcontainer/README.md and the SPEC-050 spec after every change.
  • Use Case: After bumping the Node.js version in .nvmrc, use this Skill to update the Dockerfile FROM line, verify Yarn and service image parity, and regenerate the audit report.

Quick Start

Audit the dev container setup against the regular development environment and report any drift.

Frequently Asked Questions about om-dev-container-maintenance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep a VS Code dev container in sync with my project setup?

Run the audit checklist comparing version sources like .nvmrc and package.json against the devcontainer Dockerfile, plus service parity, env var rewrites, and build sequence alignment. Fix any mismatches in the minimal affected file and update the documentation afterward.

Why does my dev container fail health checks on PostgreSQL or Redis?

Health check failures usually come from stale named volumes created with different credentials or versions. Wipe the affected volume with docker volume rm, then reopen the container so services reinitialize cleanly.

Why can't host tools connect to PostgreSQL inside the dev container?

Numeric entries in devcontainer.json forwardPorts bind to the workspace container, not the service. Use named service syntax like "postgres:5432" and "redis:6379" in forwardPorts, then rebuild the container.

What causes postCreateCommand to fail during dev container setup?

Failures typically occur at specific post-create.sh steps: volume permission errors, sed patterns in setup-env.sh not matching .env.example, missing native build tools for yarn install, or database migration conflicts. The troubleshooting guide maps each step to its diagnosis and fix.

How do I fix hot reload not working inside a dev container?

Set WATCHPACK_POLLING and CHOKIDAR_USEPOLLING to true in the workspace service environment in docker-compose.yml. This is required for file watching to work through macOS Docker bind mounts.