下面这段代码请用docker-compose写出来,docker run -p 6379:6379 --name myr3 --privileged=true -v /app/redis/redis.conf:/etc/redis/redis.conf -v /app/redis/data:/data -d redis:6.0.8 redis-server /etc/redis/redis.conf
时间: 2023-10-08 14:07:57 浏览: 168
docker-compose搭建redis
version: '3.8'
services:
redis:
image: redis:6.0.8
container_name: myr3
ports:
- "6379:6379"
volumes:
- /app/redis/redis.conf:/etc/redis/redis.conf
- /app/redis/data:/data
privileged: true
command: redis-server /etc/redis/redis.conf
阅读全文