January 2019
Intermediate to advanced
520 pages
14h 32m
English
Redis has an official image, redis, on Docker Hub. To create and run a container, use the following command:
docker run -it --rm --name test-redis -p 6379:6379 redis
This command runs a container from the redis image with the name test-redis, and forwards local port 6379 to the internal port 6379 of the container.
An interesting fact about Redis is that it uses a very plain and simple interaction protocol. You can even use telnet to interact with Redis:
telnet 127.0.0.1 6379Trying 127.0.0.1...Connected to 127.0.0.1.Escape character is '^]'.SET session-1 "Rust"+OKGET session-1$4Rust^]
The native client is more comfortable to use, but it expects the same commands as the raw protocol.
To shut down a container running ...
Read now
Unlock full access