Skip to content

Commit 84b97af

Browse files
committed
Use bake when building images with docker compose
1 parent 6140828 commit 84b97af

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

adit_radis_shared/cli/commands.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ def compose_build(profile: list[str], extra_args: list[str], **kwargs):
1717
if extra_args:
1818
cmd += " " + " ".join(extra_args)
1919

20-
helper.execute_cmd(cmd, env={"PROJECT_VERSION": helper.get_local_project_version()})
20+
helper.execute_cmd(
21+
cmd,
22+
env={
23+
"COMPOSE_BAKE": "true",
24+
"PROJECT_VERSION": helper.get_local_project_version(),
25+
},
26+
)
2127
print("Build finished.")
2228

2329

@@ -35,7 +41,13 @@ def compose_up(profile: list[str], extra_args: list[str], **kwargs):
3541
if extra_args:
3642
cmd += " " + " ".join(extra_args)
3743

38-
helper.execute_cmd(cmd, env={"PROJECT_VERSION": helper.get_local_project_version()})
44+
helper.execute_cmd(
45+
cmd,
46+
env={
47+
"COMPOSE_BAKE": "true",
48+
"PROJECT_VERSION": helper.get_local_project_version(),
49+
},
50+
)
3951

4052

4153
def compose_down(cleanup: bool, profile: list[str], **kwargs):

0 commit comments

Comments
 (0)