
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Create, manage, and automate MongoDB Atlas Local resources with Docker
This is the Docker image for the MongoDB Atlas Local experience. MongoDB Atlas Local provides a full deployment of both MongoDB (mongod) and MongoDB Search (mongot) as a single node replica set, so you can build applications with MongoDB, and make use of features like https://www.mongodb.com/products/platform/atlas-search and https://www.mongodb.com/products/platform/atlas-vector-search straight away, and throughout the entire software development lifecycle.
docker pull mongodb/mongodb-atlas-local
docker run -p 27017:27017 --name atlas-local mongodb/mongodb-atlas-local
mongosh "mongodb://localhost/?directConnection=true"
Atlas CLI
The Atlas CLI provides a guided setup that can also be used in programmatic workflows. Follow https://dochub.mongodb.org/core/atlas-cli-deploy-local.
MongoDB MCP Server
The https://github.com/mongodb/mongodb-mcp-server provides Model Context Protocol tools that let you interact with Atlas Local deployments from MCP-enabled clients such as VS Code, Cursor, and Claude Desktop. Follow https://dochub.mongodb.org/core/mongodb-mcp-server-get-started.
Docker Compose
Docker Compose offers a repeatable way for other contributors to set up full MongoDB environments in a reliable way (including healthchecks and initializing with data). Follow the https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-docker-compose/ available from the official MongoDB documentation.
Supported versions
There are four fundamental supported tags:
latest tracks the latest stable release of MongoDBpreview tracks the latest stable release of MongoDB, but with new experimental features8.0 tracks the latest 8.0 version of MongoDB7.0 tracks the latest 7.0 version of MongoDBSpecific MongoDB builds
To pin a specific version of MongoDB, we provide tags for every build, with tags formatted as <major>.<minor>.<patch>-<timestamp>, for example: 8.0.17-20260218T161908Z. You can view all available tags https://hub.docker.com/r/mongodb/mongodb-atlas-local/tags.
Preview builds
The preview tag makes new experimental features available in Atlas Local.
Note: The
previewtag only supports the latest version of MongoDB.
Current experimental features
VOYAGE_API_KEY.The following should be ***ed when using this image:
https://ai.mongodb.com/v1/embeddings.
EMBEDDING_PROVIDER_ENDPOINT environment variable to https://api.voyageai.com/v1/embeddings:
-e EMBEDDING_PROVIDER_ENDPOINT=https://api.voyageai.com/v1/embeddings
To set up authentication for your local deployment, specify the following environment variables:
MONGODB_INITDB_ROOT_USERNAME: The username for the root user.MONGODB_INITDB_ROOT_PASSWORD: The password for the root user.You may also set it via filename mappings for an extra layer of security. Specify the following environment variables:
MONGODB_INITDB_ROOT_USERNAME_FILE: The path to the file containing the username for the root user.MONGODB_INITDB_ROOT_PASSWORD_FILE: The path to the file containing the password for the root user.Map a volume to /docker-entrypoint-initdb.d containing .sh or .js files, they will be executed in alphabetical order.
The default db connected will be test unless the environment variable MONGODB_INITDB_DATABASE is set.
You can use $CONNECTION_STRING as the URI for connecting to databases in your init scripts, as it holds the default connection string for the database.
To automatically load the MongoDB sample dataset during initialization, set the MONGODB_LOAD_SAMPLE_DATA environment variable to true.
By default we only redirect mongod logs to stdout and stderr. You can set the extra environment variables to enable more logging:
MONGOT_LOG_FILE: The path to the file where you want to store the logs of Atlas Search (mongot).RUNNER_LOG_FILE: The path to the file where you want to store the logs of runner.Note: both of these variables can be set to /dev/stdout or /dev/stderr for convenience.
The image automatically runs a healthcheck every 30s to verify that mongod and mongot are healthy and that seeding scripts have successfully completed.
To programmatically wait for a healthy status of the container:
while [ "`docker inspect -f {{.State.Health.Status}} atlas-local`" != "healthy" ]; do sleep 2; done
depends_on: atlas-local condition: service_healthy
This image collects anonymous telemetry data to help us improve the product and to provide you with a better user experience. The data collected includes:
All telemetry is associated with an anonymous deployment UUID. No customer data, database names, or personally identifiable information is collected.
You can opt out of telemetry by setting the DO_NOT_TRACK environment variable to 1. For example:
docker run -e DO_NOT_TRACK=1 -p 27017:27017 --name atlas-local mongodb/mongodb-atlas-local
The specific licenses depend on which Atlas Local image is used. To check the license of a currently running Atlas Local instance, run the following commands:
docker exec atlas-local ls -Rp /usr/share/licenses/mongodb/docker exec atlas-local cat /usr/share/licenses/mongodb/LICENSE.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/mongot/LICENSE.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/server/LICENSE-Community.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/runner/LICENSE.txtFor more information, see https://dochub.mongodb.org/core/atlas-cli-deploy-docker.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务