thevishalkumar/node22-pnpm-pm2-chromium

By thevishalkumar

β€’Updated 12 months ago

Node 22 Alpine base image with pnpm, pm2, and Chromium for headless apps

Image
Languages & frameworks
Developer tools
Web servers
0

958

thevishalkumar/node22-pnpm-pm2-chromium repository overview

⁠🐳 Node 22 + pnpm + pm2 + Chromium (Alpine) – Multi-Arch, Slim Docker Base Image

Docker Pulls Image Size GitHub Repo

Minimal, multi-platform (amd64 + arm64) and production-ready Docker base image built on top of node:22-alpine, with pnpm (via Corepack), pm2, and headless Chromium preinstalled.
Ideal for full-stack Node.js apps, Puppeteer automation, PDF generation, SSR pipelines, and background workers.


β πŸ”§ What's Included?

  • βœ… Node.js v22 (Alpine)
  • βœ… bash, curl, and Chromium dependencies
  • βœ… corepack enabled with latest pnpm
  • βœ… Global pm2
  • βœ… Headless Chromium pre-installed (for Puppeteer, scraping, PDF, etc.)
  • βœ… Cleaned and slimmed image layers
  • βœ… Multi-arch: linux/amd64 & linux/arm64 (Mac M1, EC2 Graviton ready)

β πŸš€ Use Cases

Perfect base image if your app:

  • Uses pnpm for dependency management
  • Uses pm2 for clustering or daemon mode
  • Uses puppeteer with headless Chromium for:
    • PDF generation
    • Crawling/scraping
    • SSR (e.g., Next.js)
  • Needs a lightweight, production-ready Node environment

β πŸ“¦ Example Usage

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"]

β πŸ› οΈ Build Details

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

⁠🏷️ Available Tags

TagDescription
latestLatest stable build (Node 22 + Chromium + pm2 + pnpm)
22Node.js 22 with pm2 and pnpm
22-chromiumNode.js 22 + pm2 + pnpm + Chromium headless
arm64, amd64Automatically resolved via Docker’s multi-arch manifest

β πŸ› οΈ Build the Image (Multi-Platform)

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


β πŸ“© Maintainer

Vishal Kumar
πŸ₯‡ AWS Certified Solutions Architect – Professional⁠

πŸ“§ [email protected]⁠
πŸ™ GitHub: @the-vishal-kumar⁠
πŸ’Ό LinkedIn: @the-vishal-kumar⁠
🐦 X: @the_vishalkr⁠
πŸ“Έ Instagram: @the_vishal_kumar⁠

GitHub followers
LinkedIn
X Follow
Instagram


πŸ™ Always building, always learning. Open to collaborations, contributions, and coffee β˜•.


β πŸ“ License

MIT – Use it freely in your own projects.


⁠🀝 Contributions

β πŸ“ GitHub Repository πŸ”— https://github.com/the-vishal-kumar/node22-pnpm-pm2-chromium⁠

Feel free to open issues or PRs if you'd like to suggest improvements or add new versions!

Tag summary

Content type

Image

Digest

sha256:cbedca9d0…

Size

354.4 MB

Last updated

12 months ago

docker pull thevishalkumar/node22-pnpm-pm2-chromium:22-chromium