Skip to content

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
Disable Docker buildkit as it doesn't support custom networks

See merge request te/devlab!19
  • Loading branch information
Dan Farnsworth committed Feb 8, 2021
2 parents 3265e8d + ce79ad7 commit e3cc4a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devlab_bench/helpers/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ def run_nowait(self):
subprocess_args['stderr'] = subprocess.PIPE
if self.stdin:
subprocess_args['stdin'] = self.stdin
#Default subprocess behavior is to use the current env vars so if a
#custom env var is requested, we should grab the current env and then
#update the env with the new ones passed in
if self.env:
subprocess_args['env'] = dict(os.environ)
subprocess_args['env'].update(self.env)
Expand Down
4 changes: 4 additions & 0 deletions devlab_bench/helpers/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def build_image(self, name, tag, context, docker_file, apply_filter_label=True,
]
if os.path.isfile(docker_file):
with open(docker_file) as stdin:
if 'env' in kwargs:
kwargs['env'].update({'DOCKER_BUILDKIT': "0"})
else:
kwargs['env'] = {'DOCKER_BUILDKIT': "0"}
cmd_ret = Command(
self.docker_bin_paths,
opts,
Expand Down

0 comments on commit e3cc4a2

Please sign in to comment.