node22-pnpm-pm2-chromium
Node 22 Alpine base image with pnpm, pm2, and Chromium for headless apps
958
Minimal, multi-platform (amd64 + arm64) and production-ready Docker base image built on top of
node:22-alpine, withpnpm(via Corepack),pm2, and headlessChromiumpreinstalled.
Ideal for full-stack Node.js apps, Puppeteer automation, PDF generation, SSR pipelines, and background workers.
v22 (Alpine)bash, curl, and Chromium dependenciescorepack enabled with latest pnpmpm2Chromium pre-installed (for Puppeteer, scraping, PDF, etc.)linux/amd64 & linux/arm64 (Mac M1, EC2 Graviton ready)Perfect base image if your app:
pnpm for dependency managementpm2 for clustering or daemon modepuppeteer with headless Chromium for:
FROM thevishalkumar/node22-pnpm-pm2-chromium:latest
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
CMD ["pm2-runtime", "start", "ecosystem.config.js"]
FROM --platform=$BUILDPLATFORM node:22-alpine
LABEL maintainer="Vishal Kumar <[email protected]>"
LABEL base.image="node:22-alpine"
RUN apk add --no-cache \
bash \
curl \
chromium \
nss \
freetype \
harfbuzz \
ttf-freefont \
ca-certificates && \
corepack enable && \
corepack prepare pnpm@latest --activate && \
npm install -g pm2 && \
rm -rf /root/.npm /root/.cache /var/cache/apk/* /usr/share/man /tmp/*
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
CHROME_BIN=/usr/bin/chromium
| Tag | Description |
|---|---|
latest | Latest stable build (Node 22 + Chromium + pm2 + pnpm) |
22 | Node.js 22 with pm2 and pnpm |
22-chromium | Node.js 22 + pm2 + pnpm + Chromium headless |
arm64, amd64 | Automatically resolved via Dockerβs multi-arch manifest |
To build and publish the image for both amd64 and arm64 (Apple M1, Graviton, etc.):
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t thevishalkumar/node22-pnpm-pm2-chromium:latest \
-t thevishalkumar/node22-pnpm-pm2-chromium:22 \
-t thevishalkumar/node22-pnpm-pm2-chromium:22-chromium \
--push .
π‘ Requires Docker Buildx:
docker buildx create --use
Vishal Kumar
π₯ AWS Certified Solutions Architect β Professionalβ
π§ [email protected]β
π GitHub: @the-vishal-kumarβ
πΌ LinkedIn: @the-vishal-kumarβ
π¦ 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:cbedca9d0β¦
Size
354.4 MB
Last updated
12 months ago
docker pull thevishalkumar/node22-pnpm-pm2-chromium:22-chromium