Skip to content

dpulpeiro/docker-service-job-rm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-service-job-rm

Simple bash tool for removing docker service jobs.

Example of how to create one time docker service jobs

docker service create   \
  --mode replicated-job \
  --replicas 1 \
  debian:11-slim ls # Example

Usage

Install bash command

Execute the following command as root

make install

Run the command

docker-service-job-clean

Cronjob

Example of cronjob that clean all finished jobs every day at 10 AM:

0 10 * * * root docker-service-job-clean