#N/A Implicitly prefix containers names

This commit is contained in:
nvbn
2015-07-24 08:09:08 +03:00
parent e1416a0127
commit 174ada054d
4 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -17,12 +17,13 @@ def build_container(tag, dockerfile):
file.write(dockerfile)
if subprocess.call(['docker', 'build', '--tag={}'.format(tag), tmpdir],
cwd=root) != 0:
raise Exception("Can't build container")
raise Exception("Can't build a container")
shutil.rmtree(tmpdir)
@contextmanager
def spawn(tag, dockerfile):
tag = 'thefuck/{}'.format(tag)
build_container(tag, dockerfile)
proc = pexpect.spawnu(
'docker run --volume {}:/src --tty=true --interactive=true {}'.format(root, tag))