Skip to content

Commit e4a4281

Browse files
committed
Merge pull request #1641 from deis/fix/builder/no-pipe
feat(slugbuilder): build without using a pipe for git archive
2 parents 688bfb6 + 136e1fb commit e4a4281

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

builder/templates/builder

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ if __name__ == '__main__':
7474
# some applications do not have a Procfile, so only check for a Dockerfile
7575
if not os.path.exists(dockerfile):
7676
if os.path.exists('/buildpacks'):
77-
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
77+
build_cmd = "docker run -i -a stdin {config_env} -v {temp_dir}:/tmp/app -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
7878
else:
79-
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
79+
build_cmd = "docker run -i -a stdin {config_env} -v {temp_dir}:/tmp/app -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
8080
# run slugbuilder in the background
81-
p = subprocess.Popen("git archive {branch} | ".format(**locals()) + build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
81+
p = subprocess.Popen(build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
8282
container = p.stdout.read().strip('\n')
8383
# attach to slugbuilder output
8484
p = subprocess.Popen('docker attach {container}'.format(**locals()), shell=True, cwd=temp_dir)

0 commit comments

Comments
 (0)