diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/container.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index a7dc33d9d..4d3962029 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -363,9 +363,14 @@ def generate_run_arguments(name, container_config): if 'allow_host_pid' in container_config: host_pid = '--pid host' + name_server = '' + if 'name_server' in container_config: + for ns in container_config['name_server']: + name_server += f'--dns {ns}' + container_base_cmd = f'--detach --interactive --tty --replace {capabilities} --cpus {cpu_quota} {sysctl_opt} ' \ f'--memory {memory}m --shm-size {shared_memory}m --memory-swap 0 --restart {restart} ' \ - f'--name {name} {hostname} {device} {port} {volume} {env_opt} {label} {uid} {host_pid}' + f'--name {name} {hostname} {device} {port} {name_server} {volume} {env_opt} {label} {uid} {host_pid}' entrypoint = '' if 'entrypoint' in container_config: |