Back to Catalog
job-config.json
{
"config": {
"auto_remove": true,
"command": [
"sh",
"-c",
"docker system prune -af --volumes && echo 'Cleanup completed!'"
],
"image": "docker:cli",
"timeout": 120,
"volumes": {
"/var/run/docker.sock": "/var/run/docker.sock"
}
},
"type": "docker"
}Import via API
curl -X POST http://localhost:8080/api/jobs -H "Content-Type: application/json" -d '{"config":{"auto_remove":true,"command":["sh","-c","docker system prune -af --volumes && echo 'Cleanup completed!'"],"image":"docker:cli","timeout":120,"volumes":{"/var/run/docker.sock":"/var/run/docker.sock"}},"type":"docker"}'Or copy the config above and create the job manually via the web UI.
Docker System Prune
Clean up unused Docker resources including stopped containers, unused images, and dangling volumes. Helps reclaim disk space on Docker hosts.
Job TypeDOCKER
CategoryDevOps Automation
Tags
#docker #cleanup #maintenance #disk-space
Added on January 15, 2025
