Problem statement
How should I run Redis 7.0.5 on Docker if I want a maintainable layout?
The practical path is to generate the baseline Redis config and mount both data and config into stable host directories before starting the container.
That gives you a service layout that is easier to inspect, back up, and recreate later than a bare image pull plus manual flags.
What to check
- Persist both Redis data and config on the host.
- Keep the directory layout stable across rebuilds.
- Avoid one-off commands that are hard to repeat later.
Parent topic
Use helper.sh scripts to standardize containerized Nginx, MySQL, Redis, PHP, and Workerman services on long-lived hosts.