mirror of
https://github.com/containers/podman-compose.git
synced 2025-05-19 13:40:51 +02:00
FIXES #9: look for dockerfile for build
This commit is contained in:
parent
3e3fe9cba6
commit
337f3e9e2b
@ -392,6 +392,10 @@ def build(project_name, dirname, pods, containers, dry_run, podman_path):
|
|||||||
build_desc = dict(context=build_desc)
|
build_desc = dict(context=build_desc)
|
||||||
ctx = build_desc.get('context', '.')
|
ctx = build_desc.get('context', '.')
|
||||||
dockerfile = os.path.join(ctx, build_desc.get("dockerfile", "Dockerfile"))
|
dockerfile = os.path.join(ctx, build_desc.get("dockerfile", "Dockerfile"))
|
||||||
|
if not os.path.exists(dockerfile):
|
||||||
|
dockerfile = os.path.join(ctx, build_desc.get("dockerfile", "dockerfile"))
|
||||||
|
if not os.path.exists(dockerfile):
|
||||||
|
raise OSError("Dockerfile not found in "+ctx)
|
||||||
build_args = [
|
build_args = [
|
||||||
"build", "-t", cnt["image"],
|
"build", "-t", cnt["image"],
|
||||||
"-f", dockerfile
|
"-f", dockerfile
|
||||||
|
Loading…
Reference in New Issue
Block a user