This repository builds and publishes Node.js images built on top of the official Alpine-based Node.js images (node:v${VERSION}-alpine). These images are optimized for front-end asset building and compilation. These images are designed for building JavaScript, CSS, and other front-end assets, not for running Node.js applications in production. Our images are compatible with both ARM64 and x86_64 host architectures and integrate seamlessly with modern build tools like Webpack, Vite, Rollup, and other front-end bundlers.
To get a specific version of our Node.js image, use:
docker pull mxmd/node:v<VERSION>
Where:
<VERSION> is the desired Node.js major version (e.g., v14, v16, v18, v20, v22).-full to the version (e.g., v18-full).For example, to pull the Node.js 18 image:
docker pull mxmd/node:v18
Or to pull the Node.js 18 image with Chrome/Puppeteer support:
docker pull mxmd/node:v18-full
Available versions of our images along with their Docker Hub links:
Base versions:
Chrome-enabled versions:
Gulp-specific versions:
Standard Images (e.g., 18, 20, 22): Include Node.js with essential build tools and dependencies for front-end asset compilation:
Full Images (with -full suffix): Include everything from standard images plus:
Gulp Images: Include everything from standard images plus pre-installed Gulp:
gulp4 variants: Pre-installed Gulp 4.0.0 for legacy projectsgulp5 variants: Pre-installed Gulp 5.0.0 for modern projectsgulp4-full and gulp5-full variants: Combine Gulp installation with Chrome/Puppeteer supportYou can integrate our Node.js images into your front-end build workflows. Here are several common use cases:
services:
frontend-build:
image: mxmd/node:v18
container_name: frontend-builder
working_dir: /app
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
# these are CRITICAL for linux hosts
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: yarn && yarn build
services:
frontend-build-with-testing:
image: mxmd/node:v18-full
container_name: frontend-builder-full
working_dir: /app
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
shm_size: 1gb
command: |
sh -c "yarn && yarn build && yarn test:e2e"
services:
dev-server:
image: mxmd/node:v20
container_name: dev-server
working_dir: /app
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
- "5173:5173" # Vite dev server
environment:
- NODE_ENV=development
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: yarn && yarn dev
services:
install-deps:
image: mxmd/node:v18
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: yarn install --frozen-lockfile
build-assets:
image: mxmd/node:v18
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
- build_output:/app/dist
environment:
- NODE_ENV=production
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: yarn build
depends_on:
- install-deps
run-tests:
image: mxmd/node:v18-full
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
- NODE_ENV=test
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
shm_size: 1gb
command: yarn test
depends_on:
- install-deps
volumes:
node_modules:
build_output:
services:
gulp-build:
image: mxmd/node:v18-gulp4
container_name: gulp-builder
working_dir: /app
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: |
sh -c "npm install && gulp build"
services:
build-with-ssh:
image: mxmd/node:v20
working_dir: /app
volumes:
- .:/app
- /app/node_modules
- ~/.ssh:/home/node/.ssh-copy:ro # SSH keys mounted as read-only
environment:
- NODE_ENV=production
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
command: |
sh -c "yarn install && yarn build"
services:
frontend:
image: mxmd/node:v20-full
container_name: frontend-dev
working_dir: /app
volumes:
- .:/app
- /app/node_modules
- ~/.ssh:/home/node/.ssh-copy:ro
ports:
- "3000:3000"
- "5173:5173"
- "8080:8080"
environment:
- NODE_ENV=development
- HOST_USER_UID=${HOST_USER_UID:-1000}
- HOST_USER_GID=${HOST_USER_GID:-1000}
- CHOKIDAR_USEPOLLING=true # For file watching in containers
shm_size: 1gb
stdin_open: true
tty: true
command: bash # Interactive shell for development
Important Notes:
shm_size: 1gb is recommended for -full images when running Puppeteer/Chrome-based tests/home/node/.ssh-copyCHOKIDAR_USEPOLLING=true for file watching in development containersEnsure these environment variables exist on your host machine:
HOST_USER_GID
HOST_USER_UID
On macOS, you can set them in ~/.extra or ~/.bash_profile.
To get HOST_USER_UID:
id -u
To get HOST_USER_GID:
id -g
To set these on your host machine:
echo "export HOST_USER_GID=$(id -g)" >> ~/.bash_profile && echo "export HOST_USER_UID=$(id -u)" >> ~/.bash_profile && echo "export DOCKER_USER=$(id -u):$(id -g)" >> ~/.bash_profile
Content type
Image
Digest
sha256:9d1b6f9e9…
Size
282.4 MB
Last updated
4 days ago
docker pull mxmd/node:v14-gulp5-full-202609111842