Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# syntax=docker/dockerfile:1

ARG NODE_VERSION=22
ARG PNPM_VERSION=10.14.0

FROM mcr.microsoft.com/devcontainers/javascript-node:1-${NODE_VERSION}-bookworm

ARG PNPM_VERSION

ENV NEXT_TELEMETRY_DISABLED=1 \
PNPM_HOME=/pnpm \
PATH=/pnpm:${PATH}

RUN install -d -o node -g node /pnpm \
&& npm install --global "pnpm@${PNPM_VERSION}" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
git \
openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

USER node
WORKDIR /workspace/git-to.dev
22 changes: 17 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
{
"name": "git-to.dev",
"build": {
"dockerfile": "../Dockerfile",
"context": "..",
"target": "development"
"dockerfile": "Dockerfile",
"context": ".",
"args": {
"NODE_VERSION": "22",
"PNPM_VERSION": "10.14.0"
}
},
"workspaceFolder": "/workspace/${localWorkspaceFolderBasename}",
"remoteUser": "node",
"forwardPorts": [3000],
"containerEnv": {
"NEXT_TELEMETRY_DISABLED": "1"
},
"mounts": [
"type=volume,source=git-to-dev-pnpm-store,target=/pnpm/store"
],
"forwardPorts": [
3000
],
"portsAttributes": {
"3000": {
"label": "Next.js development server",
"onAutoForward": "notify"
}
},
"postCreateCommand": "pnpm install --frozen-lockfile",
"postCreateCommand": "pnpm config set store-dir /pnpm/store && pnpm install --frozen-lockfile",
"postAttachCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"customizations": {
"vscode": {
"extensions": [
Expand Down
Loading