Skip to content

Instantly share code, notes, and snippets.

@hammerdr
Last active August 29, 2015 14:13
Show Gist options
  • Save hammerdr/5fc29f3ad91d79ac42ae to your computer and use it in GitHub Desktop.
Save hammerdr/5fc29f3ad91d79ac42ae to your computer and use it in GitHub Desktop.
fig-ci.py
from fig.cli.main import TopLevelCommand
fig = TopLevelCommand()
project = fig.get_project('fig-ci.yml')
project.build()
service = project.get_service('web')
container_options = {
'command': ['pwd'],
'tty': False,
'stdin_open': True,
'detach': False
}
container = service.create_container(one_off=True, **container_options)
service.start_container(container, one_off=True)
print docker.logs(container.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment