专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单页面收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
node-mongodb

spittet/node-mongodb

自动构建
spittet

A Node.js image with MongoDB to use with Bitbucket Pipelines.

2 次收藏下载次数: 0状态:自动构建维护者:spittet仓库类型:镜像最近更新:9 年前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,不浪费每一次拉取。点击查看
镜像简介
标签下载
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。点击查看

Node.js and MongoDB for Bitbucket Pipelines

This repository contains a Dockerfile as well as a simple example that shows how you can run your own Docker container with Node.js and MongoDB on Bitbucket Pipelines.

The Docker image is using node 4.6 and MongoDB 3.2

Quickstart

Using the image with Bitbucket Pipelines

Just copy/paste the YML below in your bitbucket-pipelines.yml and adapt the script to your needs.

yaml
# This is a sample build configuration for Javascript.
# Only use spaces to indent your .yml configuration.
# -----
# This is using a custom node image that also contains MongoDB
image: spittet/node-mongodb

pipelines:
  default:
    - step:
        script:
          - npm install mongoose     
          - service mongod start     # Run this command to start the Mongo daemon
          - node test.js             # Replace this with any command you need.

Using this in a script

You'll find a sample script in this repository in test.js. It simply connects to MongoDB using the mongoose package and then lists the existing databases.

javascript
var mongoose = require('mongoose');

/// create a connection to the DB    
mongoose.connect('mongodb://localhost/test_database');

mongoose.connection.on('open', function() {
    // connection established
    new mongoose.mongo.Admin(mongoose.connection.db).listDatabases(function(err, result) {
        console.log('listDatabases succeeded');
        // database list stored in result.databases
        var allDatabases = result.databases;    
        console.log("Databases: " + JSON.stringify(allDatabases));
        mongoose.connection.close();
    });
});

Create your own image

If you want to use a different version of Node.js you can simply create your own image for it. Just copy the content of the Dockerfile and replace the first line.

This image is built from the official Node.js image at https://hub.docker.com/_/node/ and you can find there all the different versions that are supported.

Your Dockerfile won't need to have an ENTRYPOINT or CMD line as Bitbucket Pipelines will run the script commands that you put in your bitbucket-pipelines.yml file instead.

FROM node:4.6
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 \
  && echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list \
  && apt-get update \
  && apt-get install -y mongodb-org --no-install-recommends \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# This Dockerfile doesn't need to have an entrypoint and a command
# as Bitbucket Pipelines will overwrite it with a bash script.

Build the image

bash
docker build -t <your-docker-account>/node-mongodb .

Run the image locally with bash to make some tests

bash
docker run -i -t <your-docker-account>/node-mongodb /bin/bash

Push the image back to the DockerHub

bash
docker push <your-docker-account>/node-mongodb

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 node-mongodb 镜像标签

docker pull docker.xuanyuan.run/spittet/node-mongodb:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull spittet/node-mongodb:<标签>

更多 node-mongodb 镜像推荐

habilelabs/node-mongodb logo

habilelabs/node-mongodb

habilelabs
这是一个整合Node.js 10.15.3和MongoDB 3.2的Docker镜像,专为Bitbucket Pipelines设计,支持在CI/CD流程中运行依赖Node.js和MongoDB的应用测试与构建任务。
2 次收藏1万+ 次下载
7 年前更新
mongodb/mongodb-atlas-local logo

mongodb/mongodb-atlas-local

mongodb
通过Docker创建、管理和自动化MongoDB Atlas Local资源
12 次收藏1000万+ 次下载
1 天前更新
mongodb/mongodb-community-server logo

mongodb/mongodb-community-server

mongodb
官方MongoDB社区服务器是由MongoDB公司推出的免费开源文档数据库服务,专为开发者与技术社区打造,支持以JSON格式存储灵活的非结构化及半结构化数据,具备高可扩展性、易部署性和丰富的查询功能,广泛应用于Web开发、大数据分析、移动应用后端等场景,为用户提供高效的数据管理解决方案并促进社区协作与技术交流。
187 次收藏1000万+ 次下载
18 小时前更新

查看更多 node-mongodb 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

排错

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

DNS 超时

DNS 解析 · 网络超时

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
spittet/node-mongodb
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
教程轩辕镜像功能与使用教程
安装一键安装 Docker 并配置镜像源
官方公众号:源码跳动|官方技术交流群:13763429
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.