Skip to content
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

Add support for cleaning up image while destroying a task #363

Open
Jadeiin opened this issue Jul 14, 2024 · 1 comment
Open

Add support for cleaning up image while destroying a task #363

Jadeiin opened this issue Jul 14, 2024 · 1 comment

Comments

@Jadeiin
Copy link

Jadeiin commented Jul 14, 2024

The docker driver in Nomad provides the capability to clean up images when a task is destroyed (reference). This feature is essential for maintaining a clean and efficient environment, preventing the accumulation of stale or unused images which can consume significant disk space over time.

It would be highly beneficial if the podman driver in Nomad also supported this feature. Given that Podman is designed to be a drop-in replacement for Docker with a similar command structure, the ability to clean up images post-task destruction should ideally have a similar implementation.

@courtland
Copy link
Contributor

FWIW we accomplish this with the following service override.

# /etc/systemd/system/podman-auto-update.service.d/override.conff
[Service]
ExecStartPost=
ExecStartPost=/usr/bin/podman image prune -a -f

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

No branches or pull requests

2 participants