docker-redis

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
posted @ 2019-12-11 17:57  kylingx  阅读(436)  评论(0编辑  收藏  举报