Pull Image
docker pull redis:latest
Create Container and Run
Check image exist
docker images redis
Run Container
docker run -p 6379:6379 --name some-redis -v /docker/host/dir:/data -d redis redis-server --appendonly yes
Run CLI
docker container ls -a
docker exec -it redis-server redis-cli
PS
docker stop redis-server
docker start redis-server
docker restart redis-server
Ref
https://blog.csdn.net/chenjianandiyi/article/details/78962709
本文由 Ivan Dong 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Jul 7, 2023 at 04:23 am