Skip to content

Base Image

All Node.js applications in the monorepo share a common base Docker image defined in Dockerfile.base at the repository root. This image provides a consistent foundation for both local development and CI/CD builds.

What It Contains

  • Node.js 24.14 (Alpine)
  • pnpm 10.33.2 (via corepack)
  • su-exec (lightweight gosu alternative for Alpine)
dockerfile
FROM node:24.14-alpine

WORKDIR /build

ENV CI=1
ENV COREPACK_ASSUME_YES=1
ENV PNPM_HOME=/pnpm
ENV PNPM_STORE_DIR=/pnpm/store
ENV PATH=$PNPM_HOME:$PATH

RUN apk add --no-cache su-exec && \
    corepack enable && \
    corepack prepare pnpm@10.33.2 --activate && \
    pnpm config set store-dir ${PNPM_STORE_DIR}

Local vs ACR

ContextImage source
Local devBuilt by Docker Compose as feye-base-node:local
CI/CDPulled from Azure Container Registry (ACR)

The docker-compose.yml defines a base-node service that builds Dockerfile.base and tags the result as feye-base-node:local. App Dockerfiles reference the base image via a BASE_IMAGE build argument, defaulting to the ACR image in CI/CD and overridden to feye-base-node:local in Docker Compose.

This means local development never requires ACR credentials.

When to Rebuild

Rebuild the base image when:

  • Node.js version changes (the FROM tag in Dockerfile.base)
  • pnpm version changes (the corepack prepare version)
  • System-level dependencies are added or removed

Locally

bash
docker compose build base-node

CI/CD

The release pipeline has an updateBaseNodeImage parameter. Set it to true on a manual run to rebuild and push the base image to ACR. This is defined in cicd/templates/jobs/push-base-node-image.yaml.

TIP

The base image changes rarely. Most developers never need to rebuild it. When it does change, the pipeline parameter ensures the ACR image stays in sync.