1、安装
[root@vultr ~]# docker pull mongo
Using default tag: latest
latest: Pulling from library/mongo
423ae2b273f4: Already exists
de83a2304fa1: Already exists
f9a83bce3af0: Already exists
b6b53be908de: Already exists
f3cc2fb4f0eb: Pull complete
f552d845039c: Pull complete
ba6e166a9814: Pull complete
dc2ba5bee263: Pull complete
828a1244f976: Pull complete
c63a86989a84: Pull complete
ebc2ee27e8bb: Pull complete
89a06e64657c: Pull complete
1ca7a5924304: Pull complete
Digest: sha256:357486dea8e465612d99ccb4ca6e0a202e9048d1b365538cec9fb00afde415b6
Status: Downloaded newer image for mongo:latest
docker.io/library/mongo:latest
2、运行
[root@vultr ~]# docker run --name some-mongo -d mongo
8ab4126d711fadb2d3fec4cc9a7e25fcb5fe43f36dda747b037d3f92caa7af29
[root@vultr ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ab4126d711f mongo "docker-entrypoint.s…" 10 seconds ago Up 9 seconds 27017/tcp some-mongo
[root@vultr ~]# docker exec -it 8ab4126d711f bash
root@8ab4126d711f:/#
[root@vultr ~]# docker exec -it some-mongo bash
root@8ab4126d711f:/#
3、Logs
2020-02-24T00:44:05.368+0000 I CONTROL [initandlisten]
2020-02-24T00:44:05.369+0000 I STORAGE [initandlisten] createCollection: admin.system.version with provided UUID: 9deca1a3-5851-48e4-aeb3-64d7cca1f6c4 and options: { uuid: UUID("9deca1a3-5851-48e4-aeb3-64d7cca1f6c4") }
2020-02-24T00:44:05.372+0000 I INDEX [initandlisten] index build: done building index _id_ on ns admin.system.version
2020-02-24T00:44:05.372+0000 I SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2020-02-24T00:44:05.372+0000 I COMMAND [initandlisten] setting featureCompatibilityVersion to 4.2
2020-02-24T00:44:05.373+0000 I SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2020-02-24T00:44:05.373+0000 I STORAGE [initandlisten] Flow Control is enabled on this deployment.
2020-02-24T00:44:05.373+0000 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2020-02-24T00:44:05.373+0000 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 33a0c237-1eff-4d27-804b-a1d1e3b9beb5 and options: { capped: true, size: 10485760 }
2020-02-24T00:44:05.377+0000 I INDEX [initandlisten] index build: done building index _id_ on ns local.startup_log
2020-02-24T00:44:05.377+0000 I SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2020-02-24T00:44:05.377+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2020-02-24T00:44:05.378+0000 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2020-02-24T00:44:05.380+0000 I NETWORK [listener] Listening on /tmp/mongodb-27017.sock
2020-02-24T00:44:05.380+0000 I NETWORK [listener] Listening on 0.0.0.0
2020-02-24T00:44:05.380+0000 I NETWORK [listener] waiting for connections on port 27017
2020-02-24T00:44:05.384+0000 I CONTROL [LogicalSessionCacheReap] Sessions collection is not set up; waiting until next sessions reap interval: config.system.sessions does not exist
2020-02-24T00:44:05.384+0000 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with provided UUID: b2636015-3ea3-43e1-a9c0-65bc2f9eb28a and options: { uuid: UUID("b2636015-3ea3-43e1-a9c0-65bc2f9eb28a") }
2020-02-24T00:44:05.388+0000 I INDEX [LogicalSessionCacheRefresh] index build: done building index _id_ on ns config.system.sessions
2020-02-24T00:44:05.391+0000 I INDEX [LogicalSessionCacheRefresh] index build: starting on config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 } using method: Hybrid
2020-02-24T00:44:05.391+0000 I INDEX [LogicalSessionCacheRefresh] build may temporarily use up to 200 megabytes of RAM
2020-02-24T00:44:05.391+0000 I INDEX [LogicalSessionCacheRefresh] index build: collection scan done. scanned 0 total records in 0 seconds
2020-02-24T00:44:05.392+0000 I INDEX [LogicalSessionCacheRefresh] index build: inserted 0 keys from external sorter into index in 0 seconds
2020-02-24T00:44:05.392+0000 I INDEX [LogicalSessionCacheRefresh] index build: done building index lsidTTLIndex on ns config.system.sessions
2020-02-24T00:44:06.000+0000 I SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>
[root@vultr ~]#
4、URL
https://hub.docker.com/_/mongo
文章评论