1. Docker pull redis — pull the latest configuration
2. Download the latest configuration file from the Redis website
Redis. IO/switchable viewer/conf…
3. Modify the properties in the configuration file
Daemonize no — can’t start as a daemon Protected-mode no tcp-backlog 1024 — specify logfile logfile “redis.log”
4. Start the command
docker run –name redis –restart=always -p 6379:6379 -v /E/WSL/dockerwsl2/redis/config/redis.conf:/etc/redis/redis.conf -v /E/WSL/dockerwsl2/redis/data:/data/ -d redis:latest redis-server /etc/redis/redis.conf –appendonly yes appendonly Yes — persistent restart=always — starts with docker