Merge pull request #399 from SmallTianTian/patch-1

expose port.
This commit is contained in:
khs1994 2019-04-15 20:22:09 +08:00 committed by GitHub
commit 4949de94c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,13 +11,13 @@
默认会在 `6379` 端口启动数据库
```bash
$ docker run --name some-redis -d redis
$ docker run --name some-redis -d -p 6379:6379 redis
```
另外还可以启用 [持久存储](https://redis.io/topics/persistence)。
```bash
$ docker run --name some-redis -d redis redis-server --appendonly yes
$ docker run --name some-redis -d -p 6379:6379 redis redis-server --appendonly yes
```
默认数据存储位置在 `VOLUME/data`可以使用 `--volumes-from some-volume-container` `-v /docker/host/dir:/data` 将数据存放到本地