轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
mongo

arm64v8/mongo

arm64v8

MongoDB文档数据库提供高可用性和易于扩展的特性。

37 次收藏下载次数: 0状态:社区镜像维护者:arm64v8仓库类型:镜像最近更新:8 天前
让 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

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

Note: this is the "per-architecture" repository for the arm64v8 builds of https://hub.docker.com/_/mongo -- for more information, see https://github.com/docker-library/official-images#architectures-other-than-amd64 and https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what.

Quick reference

  • Maintained by:
    https://github.com/docker-library/mongo

  • Where to get help:
    https://dockr.ly/comm-slack, Server Fault, https://unix.stackexchange.com/help/on-topic, or https://stackoverflow.com/help/on-topic

Supported tags and respective Dockerfile links

(See https://github.com/docker-library/faq#whats-the-difference-between-shared-and-simple-tags.)

Simple Tags

  • https://github.com/docker-library/mongo/blob/2c69a57b939afb99266e8f97258adb178e9559e0/8.3/Dockerfile

  • https://github.com/docker-library/mongo/blob/a8cac75a3a6fedc2ce048069a862a9bcb07cd69f/8.2/Dockerfile

  • https://github.com/docker-library/mongo/blob/962851fd9c12d66f75837dd2844c83369d4ed364/8.0/Dockerfile

  • https://github.com/docker-library/mongo/blob/b05f3db94d7c2ff82c00c93bc349c0e0e8107569/7.0/Dockerfile

Shared Tags

  • 8.3.4, 8.3:

    • https://github.com/docker-library/mongo/blob/2c69a57b939afb99266e8f97258adb178e9559e0/8.3/Dockerfile
  • 8.2.11, 8.2, 8, latest:

    • https://github.com/docker-library/mongo/blob/a8cac75a3a6fedc2ce048069a862a9bcb07cd69f/8.2/Dockerfile
  • 8.0.26, 8.0:

    • https://github.com/docker-library/mongo/blob/962851fd9c12d66f75837dd2844c83369d4ed364/8.0/Dockerfile
  • 7.0.37, 7.0, 7:

    • https://github.com/docker-library/mongo/blob/b05f3db94d7c2ff82c00c93bc349c0e0e8107569/7.0/Dockerfile

Quick reference (cont.)

  • Where to file issues:
    https://github.com/docker-library/mongo/issues?q=

  • Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
    https://hub.docker.com/r/amd64/mongo/, https://hub.docker.com/r/arm64v8/mongo/, https://hub.docker.com/r/winamd64/mongo/

  • Published image artifact details:
    https://github.com/docker-library/repo-info/blob/master/repos/mongo (https://github.com/docker-library/repo-info/commits/master/repos/mongo)
    (image metadata, transfer size, etc)

  • Image updates:
    https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fmongo
    https://github.com/docker-library/official-images/blob/master/library/mongo (https://github.com/docker-library/official-images/commits/master/library/mongo)

  • Source of this description:
    https://github.com/docker-library/docs/tree/master/mongo (https://github.com/docker-library/docs/commits/master/mongo)

What is MongoDB?

MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemata. MongoDB is developed by MongoDB Inc., and is published under a com***ation of the https://www.mongodb.com/licensing/server-side-public-license and the Apache License.

First developed by the software company 10gen (now MongoDB Inc.) in October 2007 as a component of a planned platform as a service product, the company shifted to an open source development model in 2009, with 10gen offering commercial support and other services. Since then, MongoDB has been adopted as backend software by a number of major websites and services, including MetLife, Barclays, ADP, UPS, Viacom, and the New York Times, among others. MongoDB is the most popular NoSQL database system.

***.org/wiki/MongoDB

Security

By default Mongo's configuration requires no authentication for access, even for the administrative user. It is highly recommended to set a root user name and password if you plan on exposing your Mongo instance to the internet. See the "MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD" section below for instructions and the https://www.mongodb.com/docs/manual/security/ for a more complete treatment.

How to use this image

Start a mongo server instance

console
$ docker run --name some-mongo -d arm64v8/mongo:tag

... where some-mongo is the name you want to assign to your container and tag is the tag specifying the MongoDB version you want. See the list above for relevant tags.

Connect to MongoDB from another Docker container

The MongoDB server in the image listens on the standard MongoDB port, 27017, so connecting via Docker networks will be the same as connecting to a remote mongod. The following example starts another MongoDB container instance and runs the mongosh (use mongo with 4.x versions) command line client against the original MongoDB container from the example above, allowing you to execute MongoDB statements against your database instance:

console
$ docker run -it --network some-network --rm arm64v8/mongo mongosh --host some-mongo test

... where some-mongo is the name of your original mongo container.

... via https://github.com/docker/compose

Example compose.yaml for mongo:

yaml
services:
  mongo:
    image: mongo
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example

  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
      ME_CONFIG_BASICAUTH_ENABLED: true
      ME_CONFIG_BASICAUTH_USERNAME: mongoexpressuser
      ME_CONFIG_BASICAUTH_PASSWORD: mongoexpresspass

Run docker compose up, wait for it to initialize completely, and visit http://localhost:8081 or http://host-ip:8081 (as appropriate).

Container shell access and viewing MongoDB logs

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your arm64v8/mongo container:

console
$ docker exec -it some-mongo bash

The MongoDB Server log is available through Docker's container log:

console
$ docker logs some-mongo

Configuration

See the https://www.mongodb.com/docs/manual/administration/configuration/ for information on using and configuring MongoDB for things like replica sets and sharding.

Customize configuration without configuration file

Most MongoDB configuration options can be set through flags to mongod. The entrypoint of the image passes its arguments along to mongod. Example below enables MongoDB https://www.mongodb.com/docs/manual/reference/program/mongod/#profiler-options via docker run.

console
$ docker run --name some-mongo -d arm64v8/mongo --profile 1

The same can be achieved with a compose.yaml file

yaml
services:
  mongo:
    image: arm64v8/mongo
    command: --profile 1

To see the full list of possible options, check the MongoDB manual on https://www.mongodb.com/docs/manual/reference/program/mongod/ or check the --help output of mongod:

console
$ docker run -it --rm arm64v8/mongo --help

Using a custom MongoDB configuration file

For a more complicated configuration setup, you can still use the MongoDB configuration file. mongod does not read a configuration file by default, so the --config option with the path to the configuration file needs to be specified. Create a custom configuration file and put it in the container by either creating a custom Dockerfile FROM arm64v8/mongo or mounting it from the host machine to the container. See the MongoDB manual for a full list of https://www.mongodb.com/docs/manual/reference/configuration-options/ options.

For example, /my/custom/mongod.conf is the path to the custom configuration file. Then start the MongoDB container like the following:

console
$ docker run --name some-mongo -v /my/custom:/etc/mongo -d arm64v8/mongo --config /etc/mongo/mongod.conf

Environment Variables

When you start the mongo image, you can adjust the initialization of the MongoDB instance by passing one or more environment variables on the docker run command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup.

MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD

These variables, used in conjunction, create a new user and set that user's password. This user is created in the admin https://www.mongodb.com/docs/manual/core/security-users/#authentication-database and given https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-root, which is https://www.mongodb.com/docs/manual/reference/built-in-roles/#superuser-roles.

The following is an example of using these two variables to create a MongoDB instance and then using the mongosh cli (use mongo with 4.x versions) to connect against the admin authentication database.

console
$ docker run -d --network some-network --name some-mongo \
	-e MONGO_INITDB_ROOT_USERNAME=mongoadmin \
	-e MONGO_INITDB_ROOT_PASSWORD=secret \
	arm64v8/mongo

$ docker run -it --rm --network some-network arm64v8/mongo \
	mongosh --host some-mongo \
		-u mongoadmin \
		-p secret \
		--authenticationDatabase admin \
		some-db
> db.getName();
some-db

Both variables are required for a user to be created. If both are present then MongoDB will start with authentication enabled (mongod --auth).

Authentication in MongoDB is fairly complex, so more complex user setup is explicitly left to the user via /docker-entrypoint-initdb.d/ (see the Initializing a fresh instance and Authentication sections below for more details).

MONGO_INITDB_DATABASE

This variable allows you to specify the name of a database to be used for creation scripts in /docker-entrypoint-initdb.d/*.js (see Initializing a fresh instance below). MongoDB is fundamentally designed for "create on first use", so if you do not insert data with your JavaScript files, then no database is created.

Docker Secrets

As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:

console
$ docker run --name some-mongo -e MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/mongo-root -d arm64v8/mongo

Currently, this is only supported for MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD.

Initializing a fresh instance

When a container is started for the first time it will execute files with extensions .sh and .js that are found in /docker-entrypoint-initdb.d. Files will be executed in alphabetical order. .js files will be executed by mongosh (mongo on versions below 6) using the database specified by the MONGO_INITDB_DATABASE variable, if it is present, or test otherwise. You may also switch databases within the .js script.

Authentication

As noted above, authentication in MongoDB is fairly complex (although disabled by default). For details about how MongoDB handles authentication, please see the relevant upstream documentation:

  • https://www.mongodb.com/docs/manual/reference/program/mongod/#std-option-mongod.--auth
  • https://www.mongodb.com/docs/manual/core/authentication/
  • https://www.mongodb.com/docs/manual/core/authorization/
  • https://www.mongodb.com/docs/manual/reference/built-in-roles/
  • https://www.mongodb.com/docs/manual/tutorial/enable-authentication/

In addition to the /docker-entrypoint-initdb.d behavior documented above (which is a simple way to configure users for authentication for less complicated deployments), this image also supports MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD for creating a simple user with https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-root in the admin https://www.mongodb.com/docs/manual/core/security-users/#authentication-database, as described in the Environment Variables section above.

Caveats

Where to Store Data

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the mongo images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your database data https://docs.docker.com/storage/volumes/. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and https://docs.docker.com/storage/***d-mounts/. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

WARNING (Windows & OS X): When running the Linux-based MongoDB images on Windows and OS X, the file systems used to share between the host system and the Docker container is not compatible with the memory mapped files used by MongoDB (see https://www.mongodb.com/docs/manual/administration/production-notes/#fsync---on-directories and related https://jira.mongodb.org/browse/SERVER-8600). This means that it is not possible to run a MongoDB container with the data directory mapped to the host. To persist data between container restarts, we recommend using a local named volume instead (see docker volume create). Alternatively you can use the Windows-based images on Windows.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/datadir.

  2. Start your mongo container like this:

    console
    $ docker run --name some-mongo -v /my/own/datadir:/data/db -d arm64v8/mongo
    

The -v /my/own/datadir:/data/db part of the command mounts the /my/own/datadir directory from the underlying host system as /data/db inside the container, where MongoDB by default will write its data files.

This image also defines a volume for /data/configdb https://www.mongodb.com/docs/manual/reference/program/mongod/#std-option-mongod.--configsvr.

Creating database dumps

Most of the normal tools will work, although their usage might be a little convoluted in some cases to ensure they have access to the mongod server. A simple way to ensure this is to use docker exec and run the tool from the same container, similar to the following:

console
$ docker exec some-mongo sh -c 'exec mongodump -d <database_name> --archive' > /some/path/on/your/host/all-collections.archive

License

View https://github.com/mongodb/mongo/blob/6ea81c883e7297be99884185c908c7ece385caf8/README#L89-L95 for the software contained in this image.

It is relevant to note the change from AGPL to SSPLv1 for all versions after October 16, 2018.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in https://github.com/docker-library/repo-info/tree/master/repos/mongo.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

镜像拉取方式

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

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

docker pull docker.xuanyuan.run/arm64v8/mongo:<标签>

使用方法:

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

DockerHub 原生拉取命令

docker pull arm64v8/mongo:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · 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 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

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

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
arm64v8/mongo
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 mongo 镜像推荐

mongo logo

library/mongo

Docker 官方镜像
MongoDB是一种文档型数据库,具备高可用性和易扩展性,它采用灵活的文档模型(以BSON格式存储数据,类似JSON),能够高效处理非结构化和半结构化数据,通过副本集机制保障数据的高可用性,同时支持分片集群实现水平扩展,可轻松应对数据量和访问量的增长,适用于各类需要灵活存储和弹性扩展的应用场景。
1.1万 次收藏10亿+ 次下载
27 天前更新
circleci/mongo logo

circleci/mongo

circleci
为CircleCI优化的MongoDB扩展镜像,基于官方MongoDB镜像构建,便于在CircleCI环境中使用,简化Docker和CircleCI的采用流程。
16 次收藏5000万+ 次下载
4 年前更新
corpusops/mongo logo

corpusops/mongo

corpusops
corpusops/docker-images仓库提供的Docker镜像集合,包含多个优化的镜像,适用于开发环境、生产部署等多种场景。
10万+ 次下载
1 年前更新
rootpublic/mongo logo

rootpublic/mongo

rootpublic
Root精选Mongo镜像提供安全、轻量且便捷的容器化应用起点,基于官方Mongo镜像,具有减小的镜像大小、最小化的攻击面和增强的初始安全态势。
4.9千+ 次下载
10 个月前更新
uselagoon/mongo logo

uselagoon/mongo

uselagoon
暂无描述
1.5千+ 次下载
1 年前更新
mongodb/mongodb-atlas-local logo

mongodb/mongodb-atlas-local

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

查看更多 mongo 相关镜像

更多相关 Docker 镜像与资源

以下是 arm64v8/mongo 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • library/mongo Docker 镜像说明
  • amd64/mongo Docker 镜像说明(MongoDB 数据库,AMD64 架构版本)
  • mongodb/mongodb-community-server Docker 镜像说明(MongoDB 社区版,NoSQL 文档数据库,适合灵活数据模型)
  • bitnami/mongodb Docker 镜像说明(MongoDB NoSQL 数据库,Bitnami 企业级配置)
  • bitnamilegacy/mongodb Docker 镜像说明(Mongodb 容器镜像,适合 bitnamilegacy 维护的 Mongodb 工作负载部署)