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
gosualternative for Alpine)
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
| Context | Image source |
|---|---|
| Local dev | Built by Docker Compose as feye-base-node:local |
| CI/CD | Pulled 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
FROMtag inDockerfile.base) - pnpm version changes (the
corepack prepareversion) - System-level dependencies are added or removed
Locally
docker compose build base-nodeCI/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.