docker hub文档:https://hub.docker.com/_/mongo

[[email protected] ~]# docker -v
Docker version 20.10.5, build 55c4c88
[[email protected] ~]# docker pull mongo
Using default tag: latest
latest: Pulling from library/mongo
Digest: sha256:51f6fdbfc622d91e276ade7e6cf6491aa36ff2bd9b158dadb732f9e4a05f33ad
Status: Image is up to date for mongo:latest
docker.io/library/mongo:latest
[[email protected] ~]# docker images
REPOSITORY      TAG       IMAGE ID       CREATED         SIZE
mongo           latest    bbfd3e575f12   3 days ago      449MB
mysql           latest    8457e9155715   8 days ago      546MB
hello-world     latest    bf756fb1ae65   14 months ago   13.3kB
lw96/doclever   latest    bb305c190a83   2 years ago     940MB
[[email protected] ~]# docker run -d --name some-mongo -p 10050:27017 mongo:4
Unable to find image 'mongo:4' locally
4: Pulling from library/mongo
Digest: sha256:51f6fdbfc622d91e276ade7e6cf6491aa36ff2bd9b158dadb732f9e4a05f33ad
Status: Downloaded newer image for mongo:4
d1335239f99147b3078199b3c6a180cea138a2874eb4f781a9563b27b08a1179
[[email protected] ~]# docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED          STATUS          PORTS                      NAMES
d1335239f991   mongo:4         "docker-entrypoint.s…"   40 seconds ago   Up 39 seconds   0.0.0.0:10050->27017/tcp   some-mongo
697628e16761   lw96/doclever   "/entrypoint.sh"         10 hours ago     Up 10 hours     0.0.0.0:10040->10000/tcp   DOClever
3d8cb248d6c3   mongo:latest    "docker-entrypoint.s…"   10 hours ago     Up 10 hours     27017/tcp                  mongodb
[[email protected] ~]#

ROBO 3T是mongo的图形话管理工具 https://www.robomongo.org/

Copyright © OneZos all right reserved,powered by Gitbook本书发布时间: 2021-06-09 09:58:33

results matching ""

    No results matching ""