mongodb/mongodb-atlas-localCreate, manage, and automate MongoDB Atlas Local resources from docker
This is the Docker image for the Atlas Local experience.
Use the MongoDB Atlas Local Docker image to build applications with MongoDB Atlas in your preferred local environment and access features like Atlas Search and Atlas Vector Search throughout the entire software development lifecycle.
To pull the latest Docker image, run
docker pull mongodb/mongodb-atlas-local.
If you run
docker pull mongodb/mongodb-atlas-localwithout specifying a version tag, Docker automatically pulls the latest version of the Docker image (mongodb/mongodb-atlas-local:latest).
To pull a specific version of the Docker image, run the following command, replacing tag with the version tag:
docker pull mongodb/mongodb-atlas-local:<tag>.
Run the database docker run -p 27017:27017 --name atlas-local mongodb/mongodb-atlas-local
Wait till the container is healthy.
docker compose you can use depends on:yamldepends_on: atlas-local condition: service_healthy
while [ "`docker inspect -f {{.State.Health.Status}} atlas-local`" != "healthy" ]; do sleep 2; doneConnect to the database mongosh "mongodb://localhost/?directConnection=true"
To setup 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.
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.
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
For more information, see Create a Local Atlas Deployment with Docker.
manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务