redis / docker-library-redis

Docker Official Image packaging for Redis
http://redis.io
BSD 3-Clause "New" or "Revised" License
1.11k stars 560 forks source link

Execute shutdown command, causing the container to close together #368

Closed fclever1122 closed 11 months ago

fclever1122 commented 11 months ago

image

After connecting to redis, the shutdown command is executed and the container is closed together. How can I stop the redis service without closing the container?

yosifkit commented 11 months ago

You can't; the Redis server process is the container. It is the container PID 1, so if it exits, the container exits. There are no other processes running in the container.