From 2840ee13026987f903658b81918149784d024231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas=20Albadalejo?= Date: Wed, 9 Jul 2014 11:37:46 +0200 Subject: [PATCH] Added build command. --- src/docker_iface.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/docker_iface.py b/src/docker_iface.py index a732df3..9a34564 100644 --- a/src/docker_iface.py +++ b/src/docker_iface.py @@ -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()