Skip to content
Snippets Groups Projects
Commit 1e71a710 authored by Martin Mareš's avatar Martin Mareš
Browse files

Implement container_args

parent 00a98c1d
Branches
No related tags found
No related merge requests found
......@@ -23,3 +23,6 @@ podman_create_options = []
# Environment file (relative to root_dir, default=none)
# Contains lines of format "KEY=VALUE"
# env_file = "environment"
# Arguments passed to the container (default=none)
container_args = []
......@@ -63,6 +63,7 @@ class ContainerConfig:
global_config: GlobalConfig
podman_create_options: List[str]
env_path: Optional[Path]
container_args: List[str]
# Automatically generated
pid_file: str
......@@ -125,6 +126,7 @@ class ContainerConfig:
self.create_on_start = w['create_on_start'].as_bool(self.global_config.default_create_on_start)
self.podman_create_options = [o.as_str() for o in w['podman_create_options'].default_to([]).array_values()]
self.container_args = [o.as_str() for o in w['container_args'].default_to([]).array_values()]
env_file = w['env_file'].as_optional_str()
if env_file is None:
......
......@@ -236,6 +236,7 @@ def create_container(cc: ContainerConfig) -> None:
cmd.extend(['--env-file', str(cc.env_path)])
cmd.extend(cc.podman_create_options)
cmd.append(cc.image)
cmd.extend(cc.container_args)
run_command(cmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment