Skip to content

Improve devcontainer setup - #7

Open
maazghani wants to merge 1 commit into
mainfrom
maazghani/create-independent-devcontainer-configuration-2026-08-04
Open

Improve devcontainer setup#7
maazghani wants to merge 1 commit into
mainfrom
maazghani/create-independent-devcontainer-configuration-2026-08-04

Conversation

@maazghani

Copy link
Copy Markdown
Owner

Motivation

  • Make the development container independent from the application Dockerfile so the dev environment can be built and iterated without touching the production image.
  • Provide a reproducible, cached pnpm store and set container environment variables for consistent Next.js behavior.
  • Reduce friction on first attach by ensuring the container image includes common developer tools and Git safe-directory is configured.

Description

  • Add a dedicated dev container image at .devcontainer/Dockerfile based on the official Dev Containers Node 22 Bookworm image with pinned pnpm, git, and openssh-client and NEXT_TELEMETRY_DISABLED set.
  • Update .devcontainer/devcontainer.json to build from the new devcontainer Dockerfile with .devcontainer as the build context and expose build args for NODE_VERSION and PNPM_VERSION.
  • Configure a persistent pnpm store volume via mounts and set postCreateCommand to configure the pnpm store and install dependencies.
  • Add postAttachCommand to register the workspace as a safe Git directory and include containerEnv entries and existing port forwarding and VS Code extensions.

Testing

  • Ran pnpm test which executed the Vitest suite and reported all tests passing.
  • Validated JSON syntax for the updated .devcontainer/devcontainer.json with python3 -m json.tool which succeeded.
  • Attempted docker build -f .devcontainer/Dockerfile .devcontainer but the environment does not have docker available so the image build could not be executed here.

Codex Task

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
git-to Ready Ready Preview, v0 Aug 4, 2026 9:20pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant