rtsp查看中文加速指南
基于Debian的Docker镜像,预装MongoDB Shell(mongosh)
3 次收藏下载次数: 0状态:社区镜像维护者:rtsp仓库类型:镜像最近更新:
RTSP MongoDB Shell Docker Image
Debian with https://docs.mongodb.com/mongodb-shell/ included.
mongosh Usage
For the mongosh command usage, please refer to the following documents.
- https://docs.mongodb.com/mongodb-shell/connect/
- https://docs.mongodb.com/mongodb-shell/run-commands/
- https://docs.mongodb.com/mongodb-shell/crud/
- https://docs.mongodb.com/mongodb-shell/run-agg-pipelines/
- https://docs.mongodb.com/mongodb-shell/reference/options/
Usage
In order to use image from GitHub Container Registry instead of Docker Hub, you can replace rtsp/mongosh with ghcr.io/rtsp/docker-mongosh anywhere in the instruction below.
Pull Image
ShellSessiondocker pull rtsp/mongosh
Interactive Mode
ShellSessiondocker run --rm -it rtsp/mongosh mongosh -- mongodb://172.17.0.1:27017
ShellSessiondocker run --rm -it rtsp/mongosh bash
Run a Specific Command
ShellSessiondocker run --rm rtsp/mongosh mongosh -- mongodb://172.17.0.1:27017 --eval 'db.serverStatus()'
Run as Daemon
ShellSessiondocker run -d --name mongosh rtsp/mongosh
ShellSessiondocker exec mongosh mongosh -- mongodb://172.17.0.1:27017 --eval 'db.serverStatus()' docker exec -it mongosh mongosh -- mongodb://172.17.0.1:27017 docker exec -it mongosh bash
Run as Kubernetes Pod
yaml--- apiVersion: v1 kind: Pod metadata: name: mongosh spec: containers: - name: mongosh image: rtsp/mongosh:latest
ShellSessionkubectl exec mongosh -- mongosh mongodb://ENDPOINT:27017 --eval 'db.serverStatus()' kubectl exec -it mongosh -- mongosh mongodb://ENDPOINT:27017 kubectl exec -it mongosh -- bash
Run as Kubernetes Deployment
yaml--- apiVersion: apps/v1 kind: Deployment metadata: name: mongosh spec: replicas: 1 selector: matchLabels: name: mongosh template: metadata: labels: name: mongosh spec: containers: - name: mongosh image: rtsp/mongosh:latest imagePullPolicy: Always
ShellSessionkubectl exec deployment/mongosh -- mongosh mongodb://ENDPOINT:27017 --eval 'db.serverStatus()' kubectl exec -it deployment/mongosh -- mongosh mongodb://ENDPOINT:27017 kubectl exec -it deployment/mongosh -- bash
Links
Packages
- Docker Hub: https://hub.docker.com/r/rtsp/mongosh/
- GitHub: https://github.com/rtsp/docker-mongosh/pkgs/container/docker-mongosh
Source Code
- https://github.com/rtsp/docker-mongosh
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
docker pull rtsp/mongosh:<标签>
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务