[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9999":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":32,"discoverSource":33},9999,"docker-node","nodejs\u002Fdocker-node","nodejs","Official Docker Image for Node.js :whale: :turtle: :rocket: ","https:\u002F\u002Fhub.docker.com\u002F_\u002Fnode\u002F",null,"Dockerfile",8565,1998,161,45,0,2,18,1,40.9,"MIT License",false,"main",[25,26,5,27,28,7],"docker","docker-image","dockerfile","node","2026-06-12 02:02:15","# Node.js\n\n[**node - Docker Official Images on Docker Hub**](https:\u002F\u002Fhub.docker.com\u002F_\u002Fnode)\n\n[![GitHub issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fnodejs\u002Fdocker-node.svg \"GitHub issues\")](https:\u002F\u002Fgithub.com\u002Fnodejs\u002Fdocker-node)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fnodejs\u002Fdocker-node.svg \"GitHub stars\")](https:\u002F\u002Fgithub.com\u002Fnodejs\u002Fdocker-node)\n\nThe official Node.js docker image, made with love by the node community.\n\n\u003C!-- START doctoc generated TOC please keep comment here to allow auto update -->\n\u003C!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n## Table of Contents\n\n- [What is Node.js?](#what-is-nodejs)\n- [How to use this image](#how-to-use-this-image)\n  - [Create a `Dockerfile` in your Node.js app project](#create-a-dockerfile-in-your-nodejs-app-project)\n  - [Best Practices](#best-practices)\n  - [Run a single Node.js script](#run-a-single-nodejs-script)\n  - [Verbosity](#verbosity)\n    - [Dockerfile](#dockerfile)\n    - [Docker Run](#docker-run)\n    - [npm run](#npm-run)\n- [Image Variants](#image-variants)\n  - [`node:\u003Cversion>`](#nodeversion)\n  - [`node:alpine`](#nodealpine)\n  - [`node:bullseye`](#nodebullseye)\n  - [`node:bookworm`](#nodebookworm)\n  - [`node:trixie`](#nodetrixie)\n  - [`node:slim`](#nodeslim)\n- [Release Availability](#release-availability)\n- [License](#license)\n- [Supported Docker versions](#supported-docker-versions)\n- [Supported Node.js versions](#supported-nodejs-versions)\n- [Yarn v1 Classic bundling](#yarn-v1-classic-bundling)\n- [Governance and Current Members](#governance-and-current-members)\n  - [Docker Maintainers](#docker-maintainers)\n  - [Collaborators](#collaborators)\n  - [Emeritus](#emeritus)\n    - [Former Maintainers](#former-maintainers)\n\n\u003C!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## What is Node.js?\n\nNode.js is a platform built on Chrome's JavaScript runtime for easily building\nfast, scalable network applications. Node.js uses an event-driven, non-blocking\nI\u002FO model that makes it lightweight and efficient, perfect for data-intensive\nreal-time applications that run across distributed devices.\n\nSee: https:\u002F\u002Fnodejs.org\n\n## How to use this image\n\n### Create a `Dockerfile` in your Node.js app project\n\n```dockerfile\n# specify the node base image with your desired version node:\u003Cversion>\nFROM node:24\n# replace this with your application's default port\nEXPOSE 8888\n```\n\nYou can then build and run the Docker image:\n\n```console\n$ docker build -t my-nodejs-app .\n$ docker run -it --rm --name my-running-app my-nodejs-app\n```\n\nIf you prefer Docker Compose:\n\n```yml\nservices:\n  node:\n    image: \"node:24\"\n    user: \"node\"\n    working_dir: \u002Fhome\u002Fnode\u002Fapp\n    environment:\n      - NODE_ENV=production\n    volumes:\n      - .\u002F:\u002Fhome\u002Fnode\u002Fapp\n    ports: # use if it is necessary to expose the container to the host machine\n      - \"8888:8888\"\n    command: [\"npm\", \"start\"]\n```\n\nYou can then run using Docker Compose:\n\n```console\n$ docker-compose up -d\n```\n\nDocker Compose example mounts your current directory (including node_modules) to the container.\nIt assumes that your application has a file named [`package.json`](https:\u002F\u002Fdocs.npmjs.com\u002Ffiles\u002Fpackage.json)\ndefining [start script](https:\u002F\u002Fdocs.npmjs.com\u002Fmisc\u002Fscripts#default-values).\n\n### Best Practices\n\nWe have assembled a [Best Practices Guide](.\u002Fdocs\u002FBestPractices.md) for those using these images on a daily basis.\n\n### Run a single Node.js script\n\nFor many simple, single file projects, you may find it inconvenient to write a\ncomplete `Dockerfile`. In such cases, you can run a Node.js script by using the\nNode.js Docker image directly:\n\n```console\n$ docker run -it --rm --name my-running-script -v \"$PWD\":\u002Fusr\u002Fsrc\u002Fapp -w \u002Fusr\u002Fsrc\u002Fapp node:24 node your-daemon-or-script.js\n```\n\n### Verbosity\n\nPrior to 8.7.0 and 6.11.4, the docker images overrode the default npm log\nlevel from `warn` to `info`. However, due to improvements to npm and new Docker\npatterns (e.g. multi-stage builds) the working group reached a [consensus](https:\u002F\u002Fgithub.com\u002Fnodejs\u002Fdocker-node\u002Fissues\u002F528)\nto revert the log level to npm defaults. If you need more verbose output, please\nuse one of the following methods to change the verbosity level.\n\n#### Dockerfile\n\nIf you create your own `Dockerfile` which inherits from the `node` image, you can\nsimply use `ENV` to override `NPM_CONFIG_LOGLEVEL`.\n\n```dockerfile\nFROM node\nENV NPM_CONFIG_LOGLEVEL=info\n...\n```\n\n#### Docker Run\n\nIf you run the node image using `docker run`, you can use the `-e` flag to\noverride `NPM_CONFIG_LOGLEVEL`.\n\n```console\n$ docker run -e NPM_CONFIG_LOGLEVEL=info node ...\n```\n\n#### npm run\n\nIf you are running npm commands, you can use `--loglevel` to control the\nverbosity of the output.\n\n```console\n$ docker run node npm --loglevel=warn ...\n```\n\n## Image Variants\n\nThe `node` images come in many flavors, each designed for a specific use case.\nAll of the images contain pre-installed versions of `node`,\n[`npm`](https:\u002F\u002Fwww.npmjs.com\u002F), and [Yarn v1 Classic](https:\u002F\u002Fclassic.yarnpkg.com\u002F). For each\nsupported architecture, the supported variants are different. In the file:\n[versions.json](.\u002Fversions.json), it lists all supported variants for all of\nthe architectures that we support now.\nSee [Yarn v1 Classic bundling](#yarn-v1-classic-bundling) for future plans to\nremove this legacy version.\n\n### `node:\u003Cversion>`\n\nThis is the defacto image. If you are unsure about what your needs are, you\nprobably want to use this one. It is designed to be used both as a throw away\ncontainer (mount your source code and start the container to start your app), as\nwell as the base to build other images off of. This tag is based off of\n[`buildpack-deps`](https:\u002F\u002Fregistry.hub.docker.com\u002F_\u002Fbuildpack-deps\u002F).\n`buildpack-deps` is designed for the average user of docker who has many images\non their system. It, by design, has a large number of extremely common Debian\npackages. This reduces the number of packages that images that derive from it\nneed to install, thus reducing the overall size of all images on your system.\n\n### `node:alpine`\n\nThis image is based on the popular\n[Alpine Linux project](https:\u002F\u002Falpinelinux.org), available in\n[the `alpine` official image](https:\u002F\u002Fhub.docker.com\u002F_\u002Falpine). Alpine Linux is\nmuch smaller than most distribution base images (~5MB), and thus leads to much\nslimmer images in general.\n\nThis variant is highly recommended when final image size being as small as\npossible is desired. The main caveat to note is that it does use\n[musl libc](https:\u002F\u002Fmusl.libc.org\u002F) instead of\n[glibc and friends](https:\u002F\u002Fwww.etalabs.net\u002Fcompare_libcs.html), so certain\nsoftware might run into issues depending on the depth of their libc\nrequirements. However, most software doesn't have an issue with this, so this\nvariant is usually a very safe choice. See\n[this Hacker News comment thread](https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=10782897)\nfor more discussion of the issues that might arise and some pro\u002Fcon comparisons\nof using Alpine-based images.\n\nOne common issue that may arise is a missing shared library required for use of\n`process.dlopen`. To add the missing shared libraries to your image:\n\n- Starting from Alpine v3.19, you can use the\n[`gcompat`](https:\u002F\u002Fpkgs.alpinelinux.org\u002Fpackage\u002Fv3.19\u002Fmain\u002Fx86\u002Fgcompat) package\nto add the missing shared libraries: `apk add --no-cache gcompat`\n\nTo minimize image size, it's uncommon for additional related tools\n(such as `git` or `bash`) to be included in Alpine-based images. Using this\nimage as a base, add the things you need in your own Dockerfile\n(see the [`alpine` image description](https:\u002F\u002Fhub.docker.com\u002F_\u002Falpine\u002F) for\nexamples of how to install packages if you are unfamiliar).\n\nTo make the image size even smaller, you can [bundle without npm\u002Fyarn](.\u002Fdocs\u002FBestPractices.md#smaller-images-without-npmyarn).\n\n### `node:bullseye`\n\nThis image is based on version 11 of\n[Debian](https:\u002F\u002Fdebian.org), available in\n[the `debian` official image](https:\u002F\u002Fhub.docker.com\u002F_\u002Fdebian).\n\n### `node:bookworm`\n\nThis image is based on version 12 of\n[Debian](https:\u002F\u002Fdebian.org), available in\n[the `debian` official image](https:\u002F\u002Fhub.docker.com\u002F_\u002Fdebian).\n\n### `node:trixie`\n\nThis image is based on version 13 of\n[Debian](https:\u002F\u002Fdebian.org), available in\n[the `debian` official image](https:\u002F\u002Fhub.docker.com\u002F_\u002Fdebian).\n\n### `node:slim`\n\nThis image does not contain the common packages contained in the default tag and\nonly contains the minimal packages needed to run `node`. Unless you are working\nin an environment where *only* the Node.js image will be deployed and you have\nspace constraints, we highly recommend using the default image of this\nrepository.\n\n## Release Availability\n\nThis repo automatically triggers a process to build new `node` images when Node.js releases\nbecome available. The build processes can take several hours to complete.\n\nImages may initially appear on [Docker Hub](https:\u002F\u002Fhub.docker.com\u002F_\u002Fnode)\nwith incomplete or missing OS\u002FARCH listings as the build process first publishes a tag\nand then backfills each architecture when ready.\nDuring this time, if you try to pull the image, you may see an error\nmessage \"no matching manifest\". In this case, check back later.\n(See [Docker Library FAQs](https:\u002F\u002Fgithub.com\u002Fdocker-library\u002Ffaq#an-images-source-changed-in-git-now-what)\nfor a detailed description of the complex build process.)\n\nFor Node.js security releases, Debian-based `node` images may be published in advance\nof Alpine-based images. To build an Alpine-based `node` image requires\na `musl` build. This may not initially be ready at Node.js release time.\nWhen processing non-security Node.js releases, the build process will wait for\nthe `musl` build before proceeding with Debian- and Alpine-based images.\n\n## License\n\n[License information](https:\u002F\u002Fgithub.com\u002Fnodejs\u002Fnode\u002Fblob\u002Fmain\u002FLICENSE) for\nthe software contained in this image. [License information](LICENSE) for the\nNode.js Docker project.\n\n## Supported Docker versions\n\nIf you are using [Docker Desktop](https:\u002F\u002Fdocs.docker.com\u002Fget-started\u002Fget-docker\u002F),\nit is recommended to use a recent version, released in the last six months.\n\nRefer to [Docker Engine release notes](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Frelease-notes\u002F)\nfor current Engine versions.\n\n## Supported Node.js versions\n\nThis project will support Node.js versions as still under active support as per the [Node.js release schedule](https:\u002F\u002Fgithub.com\u002Fnodejs\u002FRelease).\n\n## Yarn v1 Classic bundling\n\n[Yarn v1 Classic](https:\u002F\u002Fclassic.yarnpkg.com\u002F) is currently bundled in `node` image\nvariants. Because Yarn v1 is [frozen](https:\u002F\u002Fgithub.com\u002Fyarnpkg\u002Fyarn) and no longer maintained,\nbundling plans have been revised.\n\nAs of Node.js 26.0.0 it is planned to no longer bundle Yarn v1 into `node` images.\nFor lower versions of Node.js (\u003C26) `node` images will continue to bundle Yarn v1.\n\nUsers with legacy requirements for Yarn v1 under Node.js 26 and above may be able\nto follow [Yarn v1 installation instructions](https:\u002F\u002Fclassic.yarnpkg.com\u002Fen\u002Fdocs\u002Finstall)\nand install using `npm install --global yarn`.\n\n## Governance and Current Members\n\nThe Node.js Docker Image is governed by an open maintainer model. See\n[GOVERNANCE.md](GOVERNANCE.md)\nfor project roles and decision-making, and [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidance. If a final decision cannot be reached using consensus seeking, the Node.js TSC is the final arbiter.\n\n### Docker Maintainers\n\n- Laurent Goderre ([LaurentGoderre](https:\u002F\u002Fgithub.com\u002FLaurentGoderre))\n- Simen Bekkhus ([SimenB](https:\u002F\u002Fgithub.com\u002FSimenB))\n- Peter Dave Hello ([PeterDaveHello](https:\u002F\u002Fgithub.com\u002FPeterDaveHello))\n- Rafael Gonzaga ([rafaelgss](https:\u002F\u002Fgithub.com\u002Frafaelgss))\n- Matteo Collina ([mcollina](https:\u002F\u002Fgithub.com\u002Fmcollina))\n- Nick Schonning ([nschonni](https:\u002F\u002Fgithub.com\u002Fnschonni))\n\n### Collaborators\n\n- Tianon Gravi ([tianon](https:\u002F\u002Fgithub.com\u002Ftianon))\n- ttshivers ([ttshivers](https:\u002F\u002Fgithub.com\u002Fttshivers))\n- [yosifkit](https:\u002F\u002Fgithub.com\u002Fyosifkit)\n- Stewart X Addison ([sxa](https:\u002F\u002Fgithub.com\u002Fsxa))\n- Mike McCready ([MikeMcC399](https:\u002F\u002Fgithub.com\u002FMikeMcC399))\n\nCollaborators are managed via the\n[@nodejs\u002Fdocker team](https:\u002F\u002Fgithub.com\u002Forgs\u002Fnodejs\u002Fteams\u002Fdocker).\n\n### Emeritus\n\n#### Former Maintainers\n\n- Hans Kristian Flaatten ([Starefossen](https:\u002F\u002Fgithub.com\u002FStarefossen))\n- Mikeal Rogers ([mikeal](https:\u002F\u002Fgithub.com\u002Fmikeal))\n- Christopher Horrell ([chorrell](https:\u002F\u002Fgithub.com\u002Fchorrell))\n- Peter Petrov ([pesho](https:\u002F\u002Fgithub.com\u002Fpesho))\n- John Mitchell ([jlmitch5](https:\u002F\u002Fgithub.com\u002Fjlmitch5))\n- Hugues Malphettes ([hmalphettes](https:\u002F\u002Fgithub.com\u002Fhmalphettes))\n","该项目提供了官方的Node.js Docker镜像，用于简化基于Node.js的应用程序的容器化部署。它支持多种版本的Node.js，并且提供了不同的变体如`alpine`、`slim`等以适应不同的使用场景，这些变体在文件大小和预装软件包上有所不同。该镜像非常适合需要快速构建和部署Node.js应用到Docker环境中的开发者或团队，无论是开发阶段还是生产环境中。此外，通过简单的Dockerfile配置即可轻松集成到现有的CI\u002FCD流程中，实现应用的一键式部署。","2026-06-11 03:26:02","top_topic"]