garethr / garethr-docker

Puppet module for managing docker
Apache License 2.0
397 stars 528 forks source link

How can I use "live-restore" option with current systemd templates? #691

Open fitz123 opened 7 years ago

fitz123 commented 7 years ago

Currently it's not possibly to use --live-restore docker option because puppet service template has hardcoded daemon dependency: https://github.com/garethr/garethr-docker/blob/master/templates/etc/systemd/system/docker-run.erb#L7

So any time docker daemon is restarted - it restarts all containers too. We want to avoid this behavior and be able to upgrade daemon itself and restart it with no containers affection

Is it possible to exclude "docker.service" dependency or be able to overwrite this?

Thank you and regards.

mendhak commented 6 years ago

Were you able to work around this issue? I'm looking to get a live-restore option somehow as well

fitz123 commented 6 years ago

I'm using custom template as a docker-run.erb

mendhak commented 6 years ago

Hi do you mean a template to put values into /etc/docker/daemon.json? I was thinking of doing something like that and putting the live-restore in there.

fitz123 commented 6 years ago

that one too, of course. But it already are configurable and you can update it whatever you want. the main struggle (and the point of this issue) is https://github.com/garethr/garethr-docker/blob/master/templates/etc/systemd/system/docker-run.erb#L7 which gives you no chance to restart docker service without getting all containers restarting by SystemD

mendhak commented 6 years ago

Ah thanks for the update and clarification this is very useful to me!