Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Configure grace period #16

Closed
michel-kraemer opened this issue May 22, 2015 · 3 comments
Closed

Configure grace period #16

michel-kraemer opened this issue May 22, 2015 · 3 comments

Comments

@michel-kraemer
Copy link
Contributor

It would be great if one could configure the grace period $GRACE_PERIOD_SECONDS. I suppose a good way would be to have a /etc/default/docker-gc file that you can source in your script. Such a file would just contain one line export GRACE_PERIOD_SECONDS=3600.

This would help a lot! Thanks!
Michel

@tarnfeld
Copy link

This line will actually use the variable if it's already set, so you can just change your (cron?) entry to set the env var.

GRACE_PERIOD_SECONDS=3600 /path/to/docker-gc

I think that'd work.

@michel-kraemer
Copy link
Contributor Author

Sure. I can do that. I was just thinking that a /etc/default/docker-gc file would probably be a bit more transparent. I don't think it would be much work to add it. I could try to submit a pull request, but I'm super busy with other projects at the moment. Maybe later.

Michel

@mattnworb
Copy link
Member

Hey @michel-kraemer as mentioned above you can just set GRACE_PERIOD_SECONDS=whatever when invoking the script. I think we'd prefer to keep the logic to configure via environment variables rather than sourcing a file to be consistent with how other options are set.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants