Sign inSign up

aeron/mongosh

By aeron

•Updated 7 months ago

Compact mongosh container image for interactive usage.

Image
Developer tools
Databases & storage
0

10K+

aeron/mongosh repository overview

⁠MongoDB Shell Docker Image

A compact mongosh⁠ Docker image based on bitnami/minideb⁠ base image.

Important

**For interactive usage only**. No bells and whistles included.

⁠Usage

This image is available as docker.io/aeron/mongosh⁠ and ghcr.io/Aeron/mongosh⁠. You can use them both interchangeably.

docker pull docker.io/aeron/mongosh
# …or…
docker pull ghcr.io/aeron/mongosh
⁠Interactive Mode (Docker)

Run a container and pass a Mongo URI string, like the following:

docker run -it --rm aeron/mongosh:latest -- $MONGO_URI
# …or…
docker run -it --rm aeron/mongosh:latest -- mongodb://127.0.0.1:27017

Any CLI options⁠ mongosh supports could be provided alike:

docker run -it --rm aeron/mongosh:latest -- $MONGO_URI \
    --nodb \
    --eval 'disableTelemetry()'
⁠Interactive Mode (Kubernetes)

Run a container inside a Kube cluster in a similar manner:

kubectl run mongosh --rm --tty -i --restart=Never \
    --image aeron/mongosh:latest -- $MONGO_URI

CLI options and everything else is the same here.

⁠Daemon Mode

Nope, not going to happen. It’s not the purpose of this image.

If you actually need it, feel free to use this image as a basis. Then you need to install the coreutils package and change Dockerfile’s entrypoint directive to ["sleep" "infinity"].

Or use a different image that allows that. It’d be more painless, probably.

⁠Acknowledgment

The mongosh⁠ is an open-source project made by MongoDB Inc⁠ and its contributors, available under Apache 2.0 license⁠.

Tag summary

Content type

Image

Digest

sha256:3f9c24185…

Size

142.1 MB

Last updated

7 months ago

docker pull aeron/mongosh