Commit Graph

5 Commits

Author SHA1 Message Date
David Scott
8070434cad
Merge pull request #3542 from thaJeztah/configurable_socket
pkg/trim-after-delete: make docker socket path configurable
2022-07-17 03:26:52 -07:00
Anca Iordache
d326c1b2e6 Add more event types to trigger fstrim
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-05-12 16:12:14 +02:00
Sebastiaan van Stijn
a63ff3c480
pkg/trim-after-delete: make docker socket path configurable
Docker Desktop proxies the docker socket at its default location
(/var/run/docker.sock), but allows connecting to the non-proxied
socket through /var/run/docker.sock.raw.

This patch allows the trim-after-delete utility to customize
the docker socket path, so that it can connect to the non-proxied
socket.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-21 13:11:12 +02:00
David Scott
76c7f6c1a6 trim-after-delete: also handle containers and volumes
We already run the command after an image delete but

- a container delete
- a volume delete

will also free space on the filesystem.

Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: David Scott <dave@recoil.org>
2020-10-16 16:56:53 +01:00
David Scott
38787b1ddd Add pkg/trim-after-delete
This adds a helper which monitors the Docker event stream and, when it
receives an image delete event, queues a call to `fstrim /var/lib/docker`
to trigger a space reclamation. Previously we would rely on a cron job
running every 15 minutes.

Signed-off-by: David Scott <dave.scott@docker.com>
2017-06-27 17:55:42 +01:00