从dockerhub查看redis启动所需相关参数
https://hub.docker.com/_/redis
If persistence is enabled, data is stored in the VOLUME /data, which can be used with --volumes-from some-volume-container or -v /docker/host/dir:/data
自定义启动redis
Docker版redis写法
#创建配置文件
## 准备redis配置文件内容(K8S写到configmap当中)
mkdir -p /mydata/redis/conf
vim /mydata/redis/conf/redis.conf
##配置示例
appendonly yes
port 6379
bind 0.0.0.0
#docker启动redis
docker run -d -p 6379:6379 --restart=always \
-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \
-v /mydata/redis-01/data:/data \
--name redis-01 redis:6.2.5 \
redis-server /etc/redis/redis.conf
##配置示例
appendonly yes
port 6379
bind 0.0.0.0
自定义启动命令在这个位置设置
redis-server /etc/redis/redis.conf
/etc/redis/redis.conf
连接测试工具
官网下载:https://redisdesktop.com/download
标签:mydata,0.0,KubeSphere,redis,ruoyi,----,etc,conf,data From: https://www.cnblogs.com/st2021/p/17066844.html