How to install Redis in Docker?

Viewed 11

How to install Redis in Docker?

1 Answers

Check the updated version of Redis under Docker:
https://hub.docker.com/_/redis?tab=tags

docker pull redis:latest

Startup image: Taking the startup of three Redis as an example, the mapped external ports are 6371,6372,6373, and the default password is empty:

docker run -itd --name redis1 --restart=always -p 6371:6379 redis
docker run -itd --name redis2 --restart=always -p 6372:6379 redis
docker run -itd --name redis3 --restart=always -p 6373:6379 redis

Restart command:

docker restart redis1