summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-09 07:30:59 +0100
committerGitHub <noreply@github.com>2023-02-09 07:30:59 +0100
commit10ab68a018dd137ee9a6350c131f65ec6e12e446 (patch)
treef8949f3e65c3772599eabe4bf219d60d22d6709c /src/op_mode
parent707688894c1a02953b62eadb318b0ee398c799dd (diff)
parentb17251334c57c2f6875c19ad4e6c6127aa9e1811 (diff)
downloadvyos-1x-10ab68a018dd137ee9a6350c131f65ec6e12e446.tar.gz
vyos-1x-10ab68a018dd137ee9a6350c131f65ec6e12e446.zip
Merge pull request #1790 from Zen3515/current-add-container-login
container: T4959: Add container registry authentication config for containers
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/container.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/op_mode/container.py b/src/op_mode/container.py
index d48766a0c..e7f4b0813 100755
--- a/src/op_mode/container.py
+++ b/src/op_mode/container.py
@@ -23,6 +23,8 @@ from vyos.util import cmd
import vyos.opmode
+config_containers_auth = '/etc/containers/auth.json'
+
def _get_json_data(command: str) -> list:
"""
Get container command format JSON
@@ -38,7 +40,7 @@ def _get_raw_data(command: str) -> list:
def add_image(name: str):
from vyos.util import rc_cmd
- rc, output = rc_cmd(f'podman image pull {name}')
+ rc, output = rc_cmd(f'podman image pull --authfile {config_containers_auth} {name}')
if rc != 0:
raise vyos.opmode.InternalError(output)