Skip to content

want to clean all nodes in docker swarm by using this script #6

@kumarshorav11

Description

@kumarshorav11

Hi,
I am sorry for putting this question on this place. My problem statement is :
I have 8 node in docker swarm, 3 managers and 5 workers. I used to run Jenkins pipeline to deploy services by using docker stack ..etc. Now, I see there are stale containers and images residing on the different VM's through docker info command.
As of now, I do this clean up daily by running below command -

  1. docker info
  2. docker container prune -> then confirm with y
  3. docker system prune -a -f

So, these commands clean all stale images and containers, freeing up the disk space.
Now, I want to automate this through Jenkins pipe line or script so that it should run daily without any manual intervention.
Can I use your project and how?
Thank U

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions