Offical Images:
https://hub.docker.com/_/redis
Install
1. Download Redis
2. Create configuration file
1 2 3
| mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf
|
3. Create an instance and start
1 2 3 4
| docker run -p 6379:6379 --name redis \ -v /mydata/redis/data:/data \ -v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \ -d redis redis-server /etc/redis/redis.conf
|
1 2 3
| echo "appendonly yes" >> /mydata/redis/conf/redis.conf
docker restart redis
|
2. The container runs automatically with docker startup
1
| docker update redis --restart=always
|
3. View running containers