Skip to content
repo for the cyberdojo/ragger Docker image
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



JSON in, JSON out

  • All methods receive a json hash.
    • The hash contains any method arguments as key-value pairs.
  • All methods return a json hash.
    • If the method completes, a key equals the method's name.
    • If the method raises an exception, a key equals "exception".

GET colour(image_name,id,stdout,stderr,status)

  • returns the traffic-light colour "red", "amber", or "green", by passing the stdout, stderr, status strings to a Ruby lambda, read from image_name, at /usr/local/bin/red_amber_green.rb.

    • stdout is a String
    • stderr is a String
    • status is an Integer
    • If this file does not exist in image_name, the colour is "amber".
    • If eval'ing the lambda raises an exception, the colour is "amber".
    • If calling the lambda raises an exception, the colour is "amber".
    • If calling the lambda returns anything other than :red, :amber, or :green, the colour is "amber".
    • eg
      $ docker run --rm cyberdojofoundation/gcc_assert bash -c 'cat /usr/local/bin/red_amber_green.rb'
      lambda { |stdout, stderr, status|
        output = stdout + stderr
        return :green if status == 0
        return :red   if /(.*)Assertion(.*)failed/.match(output)
        return :amber
  • parameters, eg

  {        "image_name": "cyberdojofoundation/gcc_assert",
                   "id": "15B9zD",
               "stdout": "...",
               "stderr": "...",
               "status": 3,

GET ready?

  • returns true if the service is ready, otherwise false, eg
    { "ready?": true }
    { "ready?": false }
  • parameters, none

GET sha

  • returns the git commit sha used to create the docker image, eg
    { "sha": "b28b3e13c0778fe409a50d23628f631f87920ce5" }
  • parameters, none
    {} home page

You can’t perform that action at this time.