mongosh

aeron/mongosh Docker Image

一个基于bitnami/minideb的轻量MongoDB Shell容器镜像,用于交互式操作MongoDB数据库,支持传递连接URI及CLI选项。

下载次数: 0状态:社区镜像维护者:aeron仓库类型:镜像最近更新:
下载命令
点击查看

MongoDB Shell Docker Image

A compact https://docs.mongodb.com/mongodb-shell Docker image based on https://hub.docker.com/r/bitnami/minideb base image.

[!IMPORTANT] For interactive usage only. No bells and whistles included.

Usage

This image is available as https://hub.docker.com/r/aeron/mongosh and https://github.com/Aeron/mongosh-docker/pkgs/container/mongosh. You can use them both interchangeably.

sh
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:

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

Any https://docs.mongodb.com/mongodb-shell/reference/options mongosh supports could be provided alike:

sh
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:

sh
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 https://docs.mongodb.com/mongodb-shell is an open-source project made by https://github.com/mongodb-js and its contributors, available under https://opensource.org/license/apache-2-0.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 mongosh 镜像标签

docker pull docker.xuanyuan.run/aeron/mongosh:<标签>

DockerHub 原生拉取命令

docker pull aeron/mongosh:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告