Added build command.

This commit is contained in:
José Carlos Cuevas 2014-07-09 11:37:46 +02:00
parent 6d537f9946
commit 2840ee1302

View file

@ -202,3 +202,11 @@ class DockerInterface(object):
container_object.status_from_string(container['Status'])
self.containers.append(container_object)
def build(self, path, tag):
"""
Creates a new docker image from a Dockerfile in the specified path
"""
self.client.build(path = path, tag = tag)
self.update_images()
self.update_containers()