Fix building of packager containers

This commit is contained in:
Mikhail f. Shiryaev 2021-12-14 15:19:47 +01:00
parent eb5a26891f
commit 91083bea21
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -29,7 +29,13 @@ def pull_image(image_name):
return False
def build_image(image_name, filepath):
subprocess.check_call("docker build --network=host -t {} -f {} .".format(image_name, filepath), shell=True)
context = os.path.dirname(filepath)
subprocess.check_call(
"docker build --network=host -t {} -f {} {}".format(
image_name, filepath, context
),
shell=True,
)
def run_docker_image_with_env(image_name, output, env_variables, ch_root, ccache_dir, docker_image_version):
env_part = " -e ".join(env_variables)