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 Atlas Search and 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 these instructions to Create a Local Atlas deployment using the Atlas CLI.
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 this guide to Get Started with the MongoDB MCP Server.
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 Complete Guide to Deploying MongoDB Atlas Local with 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:
ai.mongodb.com.
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 Create a Local Atlas Deployment with Docker.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务