summaryrefslogtreecommitdiff
path: root/src/conf_mode/containers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/containers.py')
-rwxr-xr-xsrc/conf_mode/containers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/containers.py b/src/conf_mode/containers.py
index 12e6953b5..2c4861449 100755
--- a/src/conf_mode/containers.py
+++ b/src/conf_mode/containers.py
@@ -237,12 +237,14 @@ def apply(container):
# Bind volume
volume = ''
if 'volume' in container_config:
- for vol, vol_config in container_config['volume']:
+ for vol, vol_config in container_config['volume'].items():
svol = vol_config['source']
dvol = vol_config['destination']
volume += f' -v {svol}:{dvol}'
- container_base_cmd = f'podman run --detach --interactive --tty --replace --memory {memory}m --restart {restart} --name {name} {port} {volume} {env_opt}'
+ container_base_cmd = f'podman run --detach --interactive --tty --replace ' \
+ f'--memory {memory}m --memory-swap 0 --restart {restart} ' \
+ f'--name {name} {port} {volume} {env_opt}'
if 'allow_host_networks' in container_config:
_cmd(f'{container_base_cmd} --net host {image}')
else: