The darthjee/node_mongo image is a Node.js 22 development image with the MongoDB command-line tools. It is built on top of darthjee/node, which is itself built on the official node:22 image. It is intended to be used as a base for Node.js projects that need to talk to MongoDB.
Its working directory is /home/node/app, owned by the node user, and it runs as the node user.
The image inherits the base image's warm yarn cache: a set of commonly used packages is pre-cached, so that when a project's yarn install asks for them they are resolved from the cache instead of being downloaded.
On top of darthjee/node, the image adds:
mongosh (the MongoDB Shell)mongodump, mongorestore, mongoimport, mongoexport, mongostat, mongotop, ...)The final user is switched from root to node.
The following packages are pre-cached by the base image in the global yarn cache (/usr/local/share/.cache/yarn/v6/). They are not installed into any node_modules; they are used when a project's package.json asks for them and yarn install is run.
expressunderscoreexpress-generatorsasseslinteslint-config-standardeslint-plugin-complexityeslint-plugin-importeslint-plugin-jasmineeslint-plugin-neslint-plugin-promiseeslint-plugin-reacteslint-plugin-react-hooksjasminenycplato| Image | Use |
|---|---|
darthjee/node_mongo | Development |
darthjee/circleci_node_mongo | CircleCI |
This image is intended to be used as a base for Node.js projects that need to talk to MongoDB. To build on top of it, reference it in your Dockerfile (see the available tags at https://hub.docker.com/r/darthjee/node_mongo/tags):
FROM darthjee/node_mongo:<version>
COPY package.json /home/node/app/
RUN yarn install
Packages already present in the yarn cache are resolved locally, which speeds up yarn install. mongosh, mongodump, mongorestore and the other tools are on the PATH, e.g. to seed or inspect a MongoDB server from the container.
See the LICENSE file for more information.
Content type
Image
Digest
sha256:7a7cc7bf9…
Size
591.8 MB
Last updated
4 days ago
docker pull darthjee/node_mongo