mirror of
https://github.com/containers/podman-compose.git
synced 2025-05-30 06:59:05 +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
|
break
|
||||||
if not path_exists(dockerfile):
|
if not path_exists(dockerfile):
|
||||||
raise OSError("Dockerfile not found in " + ctx)
|
raise OSError("Dockerfile not found in " + ctx)
|
||||||
|
|
||||||
|
dockerfile = os.path.normpath(os.path.join(ctx, dockerfile))
|
||||||
build_args = ["-f", dockerfile, "-t", cnt["image"]]
|
build_args = ["-f", dockerfile, "-t", cnt["image"]]
|
||||||
if "platform" in cnt:
|
if "platform" in cnt:
|
||||||
build_args.extend(["--platform", cnt["platform"]])
|
build_args.extend(["--platform", cnt["platform"]])
|
||||||
|
@ -46,7 +46,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
|||||||
args,
|
args,
|
||||||
[
|
[
|
||||||
'-f',
|
'-f',
|
||||||
'./Containerfile',
|
'Containerfile',
|
||||||
'-t',
|
'-t',
|
||||||
'new-image',
|
'new-image',
|
||||||
'--no-cache',
|
'--no-cache',
|
||||||
@ -67,7 +67,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
|||||||
args,
|
args,
|
||||||
[
|
[
|
||||||
'-f',
|
'-f',
|
||||||
'./Containerfile',
|
'Containerfile',
|
||||||
'-t',
|
'-t',
|
||||||
'new-image',
|
'new-image',
|
||||||
'--platform',
|
'--platform',
|
||||||
@ -90,7 +90,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
|||||||
args,
|
args,
|
||||||
[
|
[
|
||||||
'-f',
|
'-f',
|
||||||
'./Containerfile',
|
'Containerfile',
|
||||||
'-t',
|
'-t',
|
||||||
'new-image',
|
'new-image',
|
||||||
'-t',
|
'-t',
|
||||||
@ -115,7 +115,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
|||||||
args,
|
args,
|
||||||
[
|
[
|
||||||
'-f',
|
'-f',
|
||||||
'./Containerfile',
|
'Containerfile',
|
||||||
'-t',
|
'-t',
|
||||||
'new-image',
|
'new-image',
|
||||||
'--label',
|
'--label',
|
||||||
@ -141,7 +141,7 @@ class TestContainerToBuildArgs(unittest.TestCase):
|
|||||||
args,
|
args,
|
||||||
[
|
[
|
||||||
'-f',
|
'-f',
|
||||||
'./Containerfile',
|
'Containerfile',
|
||||||
'-t',
|
'-t',
|
||||||
'new-image',
|
'new-image',
|
||||||
'--no-cache',
|
'--no-cache',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user