node
Enables server-side execution of JavaScript and powers modern web apps, CLIs, and backend services.
What is node?
The node image provides Node.js, a widely used JavaScript runtime built on Chrome’s V8 engine. Node.js enables server-side execution of JavaScript and powers thousands of modern web applications, CLIs, and backend services.
This image packages the Node.js runtime along with the npm or yarn package manager (depending on variant). It’s commonly used to run JavaScript applications, serve static content, build frontend bundles, or orchestrate microservices. It supports a wide range of Node versions and base OS options for flexible builds.
The node image is ideal for developers and teams building JavaScript/TypeScript-based applications, especially those deploying frontend frameworks, REST APIs, or event-driven backends in containerized environments.
How to use this image
The node image can be used to run scripts, install dependencies, or serve full applications.
Run a Node.js REPL session:
docker run -it node
Run a local JavaScript file:
docker run -v $(pwd):/app -w /app node node app.js
Use as a base image to build and run a Node.js app:
DockerfileCopyEditFROM node:20-slimWORKDIR /appCOPY package*.json ./RUN npm installCOPY . .CMD ["npm", "start"]
Logging and behavior:
Logs from console.log
or errors are printed to stdout
. The Node process listens on your defined port (e.g. 3000), which you should expose with -p
.
If echo alt exists
{{cta}}
Image variants
Published under node, the image includes multiple variants based on Node version, base OS, and purpose:
node:<version>
Full Debian-based image with Node and npm (e.g. node:20
, node:18
).
Use for development or where full system utilities are needed.
node:<version>-slim
Stripped-down Debian variant (~50% smaller).Ideal for production builds where image size matters.
node:<version>-alpine
Minimal Alpine Linux base.Use for small containers—but be cautious with native module compatibility.
node:<version>-bullseye, -bookworm
OS-specific tags based on Debian releases.Useful when aligning with system-level constraints or security baselines.Always match the Node version to your application or framework requirements. The -slim
or -alpine
variants are popular in CI and production builds.