node.js 22 Alpine with corepack-enabled pnpm and global pm2
3.0K
Minimal and production-ready Docker base image built on top of
node:22-alpine, withpnpm(via Corepack) andpm2preinstalled for modern Node.js apps.
v22 (Alpine)bash, curlcorepack enabled with latest pnpmpm2Perfect for apps that:
pnpm for dependency managementpm2 as a process manager (e.g., clustering, daemon, monitoring)FROM thevishalkumar/node22-pnpm-pm2:latest
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
CMD ["pnpm", "start:pm2"]
FROM node:22-alpine
RUN apk add --no-cache bash curl \
&& corepack enable \
&& corepack prepare pnpm@latest --activate \
&& npm install -g pm2
latest β always points to the most recent stable image22 β Node.js 22 with latest pnpm and pm222.x.x (coming soon) β pinned patch versions for reproducible buildsVishal Kumar π₯ AWS Certified Solutions Architect β Professionalβ
π§ [email protected]β
π GitHub: @the-vishal-kumarβ
πΌ LinkedIn: @the-vishal-kumarβ
π¦ Twitter/X: @the_vishalkrβ
πΈ Instagram: @the_vishal_kumarβ
π Always building, always learning. Open to collaborations, contributions, and coffee β.
MIT β Use it freely in your own projects.
Feel free to open issues or PRs if you'd like to suggest improvements or add new versions!
Content type
Image
Digest
sha256:1afac6083β¦
Size
73.7 MB
Last updated
about 1 year ago
docker pull thevishalkumar/node22-pnpm-pm2