This commit is contained in:
khs1994
2017-11-22 11:13:23 +08:00
parent c3c3cf98cb
commit 7cbdf27d93
30 changed files with 189 additions and 193 deletions

View File

@@ -8,19 +8,19 @@
### 使用方法
默认会在 `27017` 端口启动数据库。
```sh
```bash
$ docker run --name some-mongo -d mongo
```
使用其他应用连接到容器,可以用
```sh
```bash
$ docker run --name some-app --link some-mongo:mongo -d application-that-uses-mongo
```
或者通过 `mongo`
```sh
```bash
$ docker run -it --link some-mongo:mongo --rm mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
```