Docker运行Redis

Page content

安装 Docker

运行redis

Start a container for Redis with given port 6379:

docker run -d --name redis-test -p 6379:6379 redis:latest

进入redis容器

For enter to container console and access redis, and kind in the console:

docker exec -it redis-test bash
[email protected]:/data# redis-cli
127.0.0.1:6379> set hello world
OK
127.0.0.1:6379> get hello
"world"
本文由 络壳 原创或整理,转载请注明出处