Add os.path.normpath to normalize dockerfile pathname

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
Monika Kairaityte
2025-03-18 21:19:48 +02:00
parent 4d899edeb3
commit 5f4fc4618c
2 changed files with 7 additions and 5 deletions

View File

@@ -2542,6 +2542,8 @@ def container_to_build_args(compose, cnt, args, path_exists, cleanup_callbacks=N
break
if not path_exists(dockerfile):
raise OSError("Dockerfile not found in " + ctx)
dockerfile = os.path.normpath(os.path.join(ctx, dockerfile))
build_args = ["-f", dockerfile, "-t", cnt["image"]]
if "platform" in cnt:
build_args.extend(["--platform", cnt["platform"]])