mongodb packaged with love by KubeLauncher
7.2K
Built by KubeLauncherā ā production-grade, open-source, community-first.
Production-ready, broadly compatible MongoDB document database image based on Ubuntu 24.04. Installed from the official MongoDB repository. Designed for Kubernetes, built for everyone.
8.2, 8, latestTags follow semantic versioning. Each push also generates a sha-<commit> tag for pinning to exact builds.
docker run -d --name mongodb \
-e MONGODB_ROOT_PASSWORD=mysecretpassword \
-e MONGODB_DATABASE=myapp \
-e MONGODB_USERNAME=appuser \
-e MONGODB_PASSWORD=apppass \
ghcr.io/kubelauncher/mongodb:8.2
| Variable | Default | Description |
|---|---|---|
MONGODB_PORT | 27017 | Port MongoDB listens on |
MONGODB_DATA_DIR | /data/mongodb/data | Path to the data directory |
MONGODB_LOG_DIR | /data/mongodb/logs | Path to the log directory |
MONGODB_ROOT_USERNAME | root | Username for the root admin user |
MONGODB_ROOT_PASSWORD | (none) | Password for the root admin user (enables auth) |
MONGODB_DATABASE | (none) | Name of a database to create on first run |
MONGODB_USERNAME | (none) | Name of a user to create with readWrite access |
MONGODB_PASSWORD | (none) | Password for the new user |
MONGODB_EXTRA_FLAGS | (none) | Additional flags passed to mongod |
| Port | Description |
|---|---|
27017 | MongoDB server |
Data is stored in /data/mongodb/. Mount a volume to persist data:
docker run -d -v mongodb-data:/data/mongodb ghcr.io/kubelauncher/mongodb:8.2
Place .sh or .js files in /docker-entrypoint-initdb.d/ to run them on first initialization:
docker run -d \
-v ./init.js:/docker-entrypoint-initdb.d/init.js:ro \
ghcr.io/kubelauncher/mongodb:8.2
A production-ready Helm chart is available:
helm install my-mongodb oci://ghcr.io/kubelauncher/charts/mongodb
Built by KubeLauncher ā production-grade, open-source, community-first.
Need a production Kubernetes platform? Let's talkā .
Apache-2.0
Content type
Image
Digest
sha256:f70e33e17ā¦
Size
298.8 MB
Last updated
1 day ago
docker pull kubelauncher/mongodb