nodejs / docker-node
git clone https://github.com/nodejs/docker-node.git
🔥 on GitHub Trending today
Official Docker Image for Node.js :whale: :turtle: :rocket:
—
stars, 24h
—
stars, 7 days
+9
stars, 30 days · #10,011
8.6k
★ total
2.0k
forks · 39 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageDockerfile
LicenseMIT
Created2014-12-12 (11y ago)
Last push6d ago
Watchers162
OwnerOrganization
Seen on GitHub Trending
- 2026-10-20 — #12 monthly in dockerfile · +9 ★
GitHub topics
Links
- GitHub: github.com/nodejs/docker-node
- Homepage: https://hub.docker.com/_/node/
- Releases · Issues · Hacker News mentions
README excerpt
# Node.js **node - Docker Official Images on Docker Hub** The official Node.js docker image, made with love by the node community. ## Table of Contents - What is Node.js? - How to use this image - Create a `Dockerfile` in your Node.js app project - Best Practices - Run a single Node.js script - npm loglevel - Dockerfile - Docker Run - npm run - Image Variants - `node: ` - `node:lts` - `node:alpine` - `node:bookworm` - `node:trixie` - `node:slim` - Long Term Support (LTS) - Release Availability - License - Supported Docker versions - Supported Node.js versions - Supported architectures - musl builds for Alpine - Yarn v1 Classic bundling - Governance and Current Members - Docker Maintainers - Collaborators - Emeritus ## What is Node.js? Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. See: https://nodejs.org ## How to use this image ### Create a `Dockerfile` in your Node.js app project [code] You can then build and run the Docker image: [code] If you prefer Docker Compose: [code] You can then run using Docker Compose: [code] Docker Compose example mounts your current directory (including node_modules) to the container. It assumes that your application has a file named `package.json` defining start script. ### Best Practices We have assembled a Best Practices Guide for those using these images on a daily basis. ### Run a single Node.js script For many simple, single file projects, you may find it inconvenient to write a complete `Dockerfile`. In such cases, you can run a Node.js script by using the Node.js Docker image directly: [code] ### npm loglevel The default npm loglevel is `notice`, which includes also the levels `warn` and `error`. If you need to set a different `loglevel` for npm, follow these example instructions: #### Dockerfile If you create your own `Dockerfile` which inherits from the `node` image, you can use `ENV` to set the `NPM_CONFIG_LOGLEVEL` environment variable. [code] #### Docker Run If you run the node image using `docker run`, you can use the `-e` flag to set the `NPM_CONFIG_LOGLEVEL` environment variable. [code] #### npm run If you are running npm commands, you can use the `--loglevel` command line flag to control the verbosity of the output. [code] ## Image Variants The `node` images come in many flavors, each designed for a specific use case. All of the images contain pre-installed versions of `node` which includes also `npm`. For each supported architecture, the supported variants are different. In the file: versions.json, it lists all supported variants for all of the architectures that we support now. The legacy package manager Yarn v1 Classic is included in `node` images with Node.js 25 and below. See Yarn v1 Classic bundling for details. Vie