Docker安装Redis
文档参考:https://hub.docker.com/_/redis
一.下载镜像:
docker pull redis
二.运行容器:
docker run -d –name redis –restart always -p 6379:6379 -v /data/redis/config:/etc/redis -v /data/redis/data:/data redis redis-server /etc/redis/redis.conf –requirepass “password” –appendonly yes
注意前提是 /data/redis/config 里面有redis.conf
下载地址:https://redis.io/topics/config