I have a Redis/Redis Stack container that I would like to start automatically at system boot. Since it is already running, I needed command
docker update --restart=always aa6daa0d965eHowever, if it is starting for the first time, I use command
docker run -d -p 6379:6379 --restart=always redis/redis-stack-server
There is also a third option: transform the container into a service and manage it with systemctl:
https://stackoverflow.com/a/39493500/2806801.
P.S. If you need to temporarily stop the Redis/Redis Stack container:
docker update --restart=no aa6daa0d965e docker stop aa6daa0d965e
Niciun comentariu:
Trimiteți un comentariu