Skip to content

Add Docker and development container support - #2

Merged
maazghani merged 6 commits into
mainfrom
maazghani/create-dockerfile-and-dev-container-2026-07-28
Aug 1, 2026
Merged

maazghani merged 6 commits into
mainfrom
maazghani/create-dockerfile-and-dev-container-2026-07-28

Conversation

@maazghani

Copy link
Copy Markdown
Owner

Motivation

  • Provide a reproducible production image and a convenient development container for contributors.
  • Reduce host setup friction by pinning node and pnpm versions and using pnpm with a frozen lockfile.
  • Run the production image as an unprivileged user and minimize the Docker build context.

Description

  • Add a multi-stage Dockerfile with base, dependencies, development, builder, and non-root runner stages that pins NODE_VERSION and PNPM_VERSION, installs dependencies with pnpm --frozen-lockfile, builds the app, and runs the Next.js standalone output.
  • Add a .dockerignore that excludes .git, .next, node_modules, .devcontainer, and environment files to keep the build context small.
  • Add .devcontainer/devcontainer.json that reuses the Dockerfile development target, sets workspaceFolder, forwards port 3000, runs pnpm install --frozen-lockfile in postCreateCommand, and suggests VS Code extensions.
  • Enable Next.js standalone output by setting output: "standalone" in next.config.mjs and update README.md with Docker and Dev Container usage instructions.

Testing

  • Ran git diff --check which reported no index issues and passed.
  • Validated the devcontainer JSON with python -m json.tool .devcontainer/devcontainer.json, which succeeded.
  • Ran pnpm lint, which failed because the repository does not include the ESLint flat config required by ESLint v10.
  • Ran pnpm build, which progressed to the Next.js build but failed because Next could not fetch Google Fonts (Turbopack errors) in this environment.
  • Docker image build was not executed because Docker is not available in the current execution environment.

Codex Task

@vercel

vercel Bot commented Jul 28, 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 1, 2026 1:55am

@maazghani

Copy link
Copy Markdown
Owner Author

@copilot create a GitHub action to test just that the Dockerfile build works

Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>
Co-authored-by: maazghani <5009288+maazghani@users.noreply.github.com>

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@copilot create a GitHub action to test just that the Dockerfile build works

Added .github/workflows/docker.yml to build the Dockerfile on pull requests and pushes to main. The workflow sets up Buildx and uses read-only repository permissions. Commit: d6af8e1.

…ckerfile-and-dev-container-2026-07-28' into maazghani/create-dockerfile-and-dev-container-2026-07-28
@maazghani
maazghani merged commit fc2091a into main Aug 1, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — d133d07a Deployed Aug 1, 2026 by vercel[bot]
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.

2 participants