FROM redis
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
docker run -it
--name redis01
-p 6379:6379
-v $PWD/data:/data
redis-server --appendonly yes
--requirepass "123456"
--restart=always
-v /etc/localtime:/etc/localtime:ro
-d redis:latest
官方
https://hub.docker.com/_/redis