Git Product home page Git Product logo

cf-runtime-cleaner's Introduction

cf-runtime-cleaner

Cleanup images for runtime machines (runner/builder)

Original docker-gc forked from https://github.com/spotify/docker-gc

Env vars: GRACE_PERIOD_SECONDS - we will clean images older than GRACE_PERIOD_SECONDS if and only if there is no container for that image default 86400 (1day)

CLEAN_INTERVAL - cleaning runs every $CLEAN_INTERVAL . Default = 3600

RM_DRY_RUN=${RM_DRY_RUN:=1} - Dry run for Containers RMI_DRY_RUN=${RMI_DRY_RUN:=0} - Dry run for Images

see ./docker-gc for other possible envs

should be ran with mounting docker socket:

docker run -d --name rt-cleaner -v /var/run/docker.sock:/var/run/docker.sock:rw codefresh/cf-runtime-cleaner:latest ./docker-gc

Add to crontab (root):

#codefresh runtime-cleaner
20 4 * * * docker run --rm --name rt-cleaner -v /var/run/docker.sock:/var/run/docker.sock:rw --label io.codefresh.owner=codefresh -e GRACE_PERIOD_SECONDS=86400 --cpu-shares=10 codefresh/cf-runtime-cleaner:latest ./docker-gc >> /var/log/rt-cleaner.log 2>&1

cf-runtime-cleaner's People

Contributors

kosta-codefresh avatar bahchis avatar vova-codefresh avatar kosta709 avatar alex-codefresh avatar itai-codefresh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.