docker-compose安装redis
docker-compose.yaml
version: "3"
services:
redis:
image: redis:5.0.8
container_name: redis
restart: always
command: redis-server /etc/redis/redis.conf
ports:
- 6379:6379
volumes:
- /data/redis/redis.conf:/etc/redis/redis.conf
- /data/redis/data:/data
redis.conf
requirepass youpass protected-mode no
docker-compose up -d