-
redis.conf
confacllog-max-len 128 requirepass 密码 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no replica-lazy-flush no lazyfree-lazy-user-del no lazyfree-lazy-user-flush no oom-score-adj no oom-score-adj-values 0 200 800 disable-thp yes appendonly no appendfilename "appendonly.aof" appendfsync everysec no-appendfsync-on-rewrite no auto-aof-rewrite-percentage 100 auto-aof-rewrite-min-size 64mb aof-load-truncated yes aof-use-rdb-preamble yes lua-time-limit 5000 slowlog-log-slower-than 10000 slowlog-max-len 128 latency-monitor-threshold 0 notify-keyspace-events "" hash-max-ziplist-entries 512 hash-max-ziplist-value 64 list-max-ziplist-size -2 list-compress-depth 0 set-max-intset-entries 512 zset-max-ziplist-entries 128 zset-max-ziplist-value 64 -
docker-compose.yml
ymlversion: '3' services: redis: image: redis:8.4.0 container_name: redis_all ports: - 6379:6379 volumes: - ./redis.conf:/etc/redis/redis.conf - ./data:/data restart: always privileged: true # 获取宿主机root权限 command: ["redis-server","/etc/redis/redis.conf"] # 指定配置文件启动redis-server进程 -
docker compose up -d
docker-compose安装Redis
宋情写2026-01-18 15:23
相关推荐
leeyi3 天前
Checkpoint 机制:Agent 怎么在断电后接着跑云技纵横4 天前
一个 @Async 让循环依赖暴雷:Spring 代理的暗坑Patrick_Wilson4 天前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖犯困蛋挞yy5 天前
用Claude快速解决Redis代码报错反复无解的问题Suroy5 天前
DockerView-Go:用 Go 写一个终端 Docker 监控工具,顺便做了个 Web 仪表盘云恒要逆袭5 天前
运行你的第一个Docker容器宋均浩6 天前
# Docker 镜像瘦身实战:从 1.2G 到 80MB 的五个优化步骤程序员老赵6 天前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)WangMingHua1117 天前
LM Studio Docker 部署——本地大模型一键启动曲幽8 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了