opened
michel-kraemer
username_0
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
Configure grace period
issue
created
tarnfeld
username_1
[This line](https://github.com/spotify/docker-gc/blob/master/docker-gc#L39) 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.
comment
created
michel-kraemer
username_0
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 can try to send you a pull request if you like. Just not now, because I'm super busy with other projects, but maybe in a couple of weeks?

Michel
comment
created
mattnworb
username_2
Hey @username_0 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.
comment
closed
mattnworb
username_2
issue