mongodb/mongodb-atlas-local
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-local
without 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 mongodb/mongodb-atlas-local
Connect 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.
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. You can opt out of telemetry by setting the DO_NOT_TRACK
environment variable to 1
.
For more information, see Create a Local Atlas Deployment with Docker.
docker pull mongodb/mongodb-atlas-local