summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-09-09 10:45:12 +0300
committerGitHub <noreply@github.com>2023-09-09 10:45:12 +0300
commitb2383561158a3a78e2db8fefb37f1137147642ba (patch)
tree5223aaa8be7e1095f71d861437347a5ad483f9d6 /src
parentcfe1dbd7ab9c8ab55eeca04c0c2e01b0299cc558 (diff)
parented47ac6560d0840efe1cfd99fd7b798554a740c5 (diff)
downloadvyos-1x-b2383561158a3a78e2db8fefb37f1137147642ba.tar.gz
vyos-1x-b2383561158a3a78e2db8fefb37f1137147642ba.zip
Merge pull request #2229 from c-po/sagitta
container: T5563 Fix environment replaced by label
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 46eb10714..daad9186e 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -274,10 +274,10 @@ def generate_run_arguments(name, container_config):
env_opt += f" --env \"{k}={v['value']}\""
# Check/set label options "--label foo=bar"
- env_opt = ''
+ label = ''
if 'label' in container_config:
for k, v in container_config['label'].items():
- env_opt += f" --label \"{k}={v['value']}\""
+ label += f" --label \"{k}={v['value']}\""
hostname = ''
if 'host_name' in container_config:
@@ -314,7 +314,7 @@ def generate_run_arguments(name, container_config):
container_base_cmd = f'--detach --interactive --tty --replace {cap_add} ' \
f'--memory {memory}m --shm-size {shared_memory}m --memory-swap 0 --restart {restart} ' \
- f'--name {name} {hostname} {device} {port} {volume} {env_opt}'
+ f'--name {name} {hostname} {device} {port} {volume} {env_opt} {label}'
entrypoint = ''
if 'entrypoint' in container_config: