3 ms·
Doesn't Compose take care of that with "restart: always"? Though that probably doesn't work on reboot...
by StavrosK 6y ago
Doesn't Compose take care of that with "restart: always"? Though that probably doesn't work on reboot...
- 0_gravitas 6y agoIt does!
- easton 6y ago"restart: always" and "restart: unless-stopped" both work fine after reboot on my system. (Although Docker recommends managing it using systemd or upstart if you want more granular control). https://docs.docker.com/config/containers/start-containers-automatically/ https://docs.docker.com/config/containers/start-containers-a...
- StavrosK 6y agoThis is for Docker, right? Not Compose? Though I guess Compose would just set the flag in Docker, in which case it'd do the same thing. I don't want more granularity than "unless stopped", basically, so this is ideal, thanks!
- mldbk 6y agoDocker-compose is just a wrapper by itself. It just make volumes, port forwarding, etc based what you you will describe in your docker-compose file. So if you have proper Docker installation, containers will restart on reboot.