version: ‘3‘
services:
redis:
image: redis:6
container_name: redis1
restart: always
ports:
- 6379:6379
environment:
TZ: Asia/Shanghai
LANG: en_US.UTF-8
volumes:
- ./data:/data
- ./config/redis.conf:/etc/redis.conf
entrypoint: redis-server /etc/redis.conf
bing 127.0.0.1 改为 bind 0.0.0.0
appendonly no 改为 appendonly yes
原文:https://www.cnblogs.com/yloved/p/14390124.html