Giter Site home page Giter Site logo

moby-ryuk's Introduction

Moby Ryuk

This project helps you to remove containers/networks/volumes/images by given filter after specified delay.

Usage

  1. Start it:

     $ RYUK_PORT=8080 ./bin/moby-ryuk
     $ # You can also run it with Docker
     $ docker run -v /var/run/docker.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 testcontainers/ryuk:0.4.0
    
  2. Connect via TCP:

     $ nc localhost 8080
    
  3. Send some filters:

     label=testing=true&health=unhealthy
     ACK
     label=something
     ACK
    
  4. Close the connection

  5. Send more filters with "one-off" style:

     printf "label=something_else" | nc localhost 8080
    
  6. See containers/networks/volumes deleted after 10s:

     2018/01/15 18:38:52 Timed out waiting for connection
     2018/01/15 18:38:52 Deleting {"label":{"something":true}}
     2018/01/15 18:38:52 Deleting {"label":{"something_else":true}}
     2018/01/15 18:38:52 Deleting {"health":{"unhealthy":true},"label":{"testing=true":true}}
     2018/01/15 18:38:52 Removed 1 container(s), 0 network(s), 0 volume(s), 0 image(s)
    

Ryuk configuration

  • RYUK_CONNECTION_TIMEOUT - Environment variable that defines the timeout for Ryuk to receive the first connection (default: 60s). Value layout is described in time.ParseDuration documentation.
  • RYUK_PORT - Environment variable that defines the port where Ryuk will be bound to (default: 8080).
  • RYUK_RECONNECTION_TIMEOUT - Environment variable that defines the timeout for Ryuk to reconnect to Docker (default: 10s). Value layout is described in time.ParseDuration documentation.
  • RYUK_VERBOSE - Environment variable that defines if Ryuk should print debug logs (default: false).

moby-ryuk's People

Contributors

alelech avatar bsideup avatar cristianrgreco avatar darrenfoong avatar dbyron-sf avatar dependabot[bot] avatar eddumelendez avatar gesellix avatar hhsnopek avatar hofmeisteran avatar matthewmcnew avatar mdelapenya avatar nikolayk812 avatar psanetra avatar rnorth avatar

Watchers

 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.