Tianon Gravi ded8e671e4 Add LICENSE for stackbrew (Apache) 11 years ago
..
brew ed2291ff94 Build each library file in the order the tags are defined in the file for now (while we work out a more general solution for #125) 11 years ago
lib 1608e32294 Fix to save/load history 11 years ago
LICENSE ded8e671e4 Add LICENSE for stackbrew (Apache) 11 years ago
README.md 5e0fd23c4f docker-brew -> stackbrew 12 years ago
app.py 2c6b987bfd Support for targets in webbrew config 11 years ago
brew-cli 7530c8ee6c Fix `--targets` by converting the argument to an actual list instead of relying on string handling 11 years ago
config.json 003ff9484e Stackbrew overhaul: v2 (WIP) 11 years ago
create_db.py 8ec6a5dd50 v2 to brew 11 years ago
requirements.txt d7df641f53 Update docker.Client to default to DOCKER_HOST so that it "just works" more often 11 years ago
wsgi.py 5ee34c94f3 Stackbrew alpha 12 years ago

README.md

Stackbrew

Stackbrew is a web-application that performs continuous building of the docker standard library.

Install instructions

  1. Install python if it isn't already available on your OS of choice
  2. Install the easy_install tool (sudo apt-get install python-setuptools for Debian/Ubuntu)
  3. Install the python package manager, pip (easy_install pip)
  4. Run the following command: sudo pip install -r requirements.txt
  5. You should now be able to use the brew-cli script as such.

Deploying stackbrew

These additional instructions are necessary for the stackbrew application to function.

  1. Install sqlite3 (sudo apt-get install sqlite3 on Debian/Ubuntu)
  2. Create the /opt/stackbrew/repos (mkdir -p /opt/stackbrew/repos) folder.
  3. Run the create_db.py script (python create_db.py)
  4. Edit config.json appropriately to your needs.
  5. If you're using the push option, you will need to have a valid .dockercfg file in your HOME directory.
  6. You can start the application with the command python app.py

Builds

Builds are performed regularly and pushed to the public index.

API

A small JSON API allows users to check the status of past builds.

Latest build summary

  • GET /summary or GET /status

    GET /summary
    
    {
        "build_date": "2013-10-04 18:08:45.685881", 
        "id": 16, 
        "result": true
    }
    

Summary details

  • GET /summary/<summary_id>

    GET /summary/16
    
    [
        {
            "commit_id": "7362ff5b812f93eceafbdbf5e5959f676f731f80", 
            "exception": null, 
            "source_desc": "git://github.com/dotcloud/hipache@C:7362ff5b812f93eceafbdbf5e5959f676f731f80",
            "image_id": "5d313f0ec5af",
            "tag": "0.2.4",
            "summary_id": 16,
            "id": 1,
            "repo_name": "hipache"
        }, {
            "commit_id": "7362ff5b812f93eceafbdbf5e5959f676f731f80",
            "exception": null,
            "source_desc": "git://github.com/dotcloud/hipache@C:7362ff5b812f93eceafbdbf5e5959f676f731f80",
            "image_id": "5d313f0ec5af",
            "tag": "latest",
            "summary_id": 16,
            "id": 2,
            "repo_name": "hipache"
        }, ...
    ]
    

Latest successful build

  • GET /success/<repo_name>?tag=<tag>
  • tag parameter is optional, defaults to latest

    GET /success/ubuntu?tag=12.10
    
    {
        "commit_id": "abd58c43ceec4d4a21622a1e3d45f676fe912e745d31",
        "exception": null,
        "source_desc": "git://github.com/dotcloud/ubuntu-quantal@B:master",
        "image_id": "d462fecc33e1",
        "tag": "12.10",
        "summary_id": 17,
        "id": 19,
        "repo_name": "ubuntu"
    }
    

Stackbrew CLI

./brew-cli -h

Display usage and help.

./brew-cli

Default build from the default repo/branch. Images will be created under the library/ namespace. Does not perform a remote push.

./brew-cli -n mycorp.com -b stable --push git://github.com/mycorp/docker

Will fetch the library definition files in the stable branch of the git://github.com/mycorp/docker repository and create images under the mycorp.com namespace (e.g. mycorp.com/ubuntu). Created images will then be pushed to the official docker repository (pending: support for private repositories)