Skip to content

obukhov-sergey/shipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shipper

Shipper is a fabric for docker - library for orchestrating docker containers. Supports parallel execution and can generate command line interface.

Setup

git clone git@github.com:mailgun/shipper.git
cd shipper
python setup.py install

Status

Undergoing development. Is already useful for building dev environments.

Examples

Define the commands that orchestrate your environments as python code

In file env.py:

from shipper import Shipper, run, command

@command
def build(tag, path):
    s = Shipper()
    s.build(tag=tag, path=path)

@command
def ps(all=False, running=True):
    s = Shipper(["host-a", "host-b"])
    print s.containers(pretty=True, all=all, running=running)

@command
def start(image, command, ports=None):
    if ports:
        ports = ports.split(",")
    s = Shipper()
    s.run(image, command, ports=ports, once=True)

@command
def stop(image=None):
    s = Shipper()
    s.stop(*s.containers(image=image, running=True))

run()

Now you can use the env.py file as your command line tool, shipper has generated the command line interface.

python env.py ps --all
python env.py build base ~/images/base
python env.py build stop --image dev/.*

About

Fabric for docker containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published