duminică, 26 ianuarie 2025

How do I make a Docker container start automatically on system boot?

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 aa6daa0d965e
However, if it is starting for the first time, I use command
docker run --restart=always

There is also a third option: transform the container into a service and manage it with systemctl: https://stackoverflow.com/a/39493500/2806801.

 

Niciun comentariu:

Trimiteți un comentariu