mirror of
https://github.com/containers/podman-compose.git
synced 2025-05-28 22:28:33 +02:00
Add os.path.normpath to normalize dockerfile pathname
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
parent
4d899edeb3
commit
5f4fc4618c
@ -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"]])
|
||||
|
@ -46,7 +46,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
||||
args,
|
||||
[
|
||||
'-f',
|
||||
'./Containerfile',
|
||||
'Containerfile',
|
||||
'-t',
|
||||
'new-image',
|
||||
'--no-cache',
|
||||
@ -67,7 +67,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
||||
args,
|
||||
[
|
||||
'-f',
|
||||
'./Containerfile',
|
||||
'Containerfile',
|
||||
'-t',
|
||||
'new-image',
|
||||
'--platform',
|
||||
@ -90,7 +90,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
||||
args,
|
||||
[
|
||||
'-f',
|
||||
'./Containerfile',
|
||||
'Containerfile',
|
||||
'-t',
|
||||
'new-image',
|
||||
'-t',
|
||||
@ -115,7 +115,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
||||
args,
|
||||
[
|
||||
'-f',
|
||||
'./Containerfile',
|
||||
'Containerfile',
|
||||
'-t',
|
||||
'new-image',
|
||||
'--label',
|
||||
@ -141,7 +141,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
||||
args,
|
||||
[
|
||||
'-f',
|
||||
'./Containerfile',
|
||||
'Containerfile',
|
||||
'-t',
|
||||
'new-image',
|
||||
'--no-cache',
|
||||
|
Loading…
x
Reference in New Issue
Block a user