Docker-redis 安裝
阿新 • • 發佈:2019-04-09
拉取映象
docker pull redis:5.0.4
執行
docker run \ -p 7879:7879 \ -v /redis-uums/conf/redis.conf:/etc/redis/redis.conf \ -v /redis-uums/data:/data \ --name redis-uums -d redis:5.0.4 redis-server /etc/redis/redis.conf
注意:
1. /redis-uums/conf/redis.conf 中的 daemonize 要設定成 no
2. /redis-uums/conf/redis.conf 要預先建立好,執行的配置是根據該檔案的,而不是/etc/redis/redis.conf
3.如果要修改埠號, -p 7879:7879 是必須指定的。不能只修改/redis-uums/conf/redis.conf 中的埠號