Skip to content

Commit 0a9793e

Browse files
feat: Allow the use of third party images to build dependencies (#245)
Co-authored-by: Anton Babenko <[email protected]>
1 parent a57ce74 commit 0a9793e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,13 +971,15 @@ def docker_run_command(build_root, command, runtime,
971971
if platform.system() not in ('Linux', 'Darwin'):
972972
raise RuntimeError("Unsupported platform for docker building")
973973

974-
docker_cmd = ['docker', 'run', '--rm']
974+
workdir = '/var/task'
975+
976+
docker_cmd = ['docker', 'run', '--rm', '-w', workdir]
975977

976978
if interactive:
977979
docker_cmd.append('-it')
978980

979981
bind_path = os.path.abspath(build_root)
980-
docker_cmd.extend(['-v', "{}:/var/task:z".format(bind_path)])
982+
docker_cmd.extend(['-v', "{}:{}:z".format(bind_path, workdir)])
981983

982984
home = os.environ['HOME']
983985
docker_cmd.extend([

0 commit comments

Comments
 (0)