-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
docker service: add option to do automatic pruning #27503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows to run the prune job periodically on a machine. By default the if enabled the job is run once a week. The structure is similar to how system.autoUpgrade works.
@bachp, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tailhook, @Mic92 and @offlinehacker to be potential reviewers. |
default = false; | ||
description = '' | ||
Whether to periodically prune Docker resources. If enabled, a systemd timer will run | ||
<literal>docker system prune -f</literal> once a day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It runs according to the schedule below, not once a day, right?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be more correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1697684.
Thanks
Am 21.07.2017 4:55 nachm. schrieb "Franz Pletz" <notifications@github.com>:
… ***@***.**** commented on this pull request.
------------------------------
In nixos/modules/virtualisation/docker.nix
<#27503 (comment)>:
> @@ -94,6 +94,37 @@ in
<command>docker</command> daemon.
'';
};
+
+ autoPrune = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to periodically prune Docker resources. If enabled, a systemd timer will run
+ <literal>docker system prune -f</literal> once a day.
Fixed in 1697684
<1697684>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#27503 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAUX76jMvp_AOqv1YBmAFxKfvlCptp5aks5sQLvHgaJpZM4OdFqM>
.
|
Motivation for this change
This allows to run the prune job periodically on a machine.
By default the if enabled the job is run once a week.
The structure is similar to how system.autoUpgrade works.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)