diff --git a/supervisor/docker/manager.py b/supervisor/docker/manager.py index 148fe92e4..fc4461c67 100644 --- a/supervisor/docker/manager.py +++ b/supervisor/docker/manager.py @@ -294,7 +294,7 @@ class DockerAPI: def run_command( self, image: str, - tag: str = "latest", + version: str = "latest", command: str | None = None, **kwargs: Any, ) -> CommandReturn: @@ -305,11 +305,13 @@ class DockerAPI: stdout = kwargs.get("stdout", True) stderr = kwargs.get("stderr", True) - _LOGGER.info("Runing command '%s' on %s", command, image) + image_with_tag = f"{image}:{version}" + + _LOGGER.info("Runing command '%s' on %s", command, image_with_tag) container = None try: container = self.docker.containers.run( - f"{image}:{tag}", + image_with_tag, command=command, network=self.network.name, use_config_proxy=False, diff --git a/tests/docker/test_manager.py b/tests/docker/test_manager.py index bc2f85cce..c06c2b3bc 100644 --- a/tests/docker/test_manager.py +++ b/tests/docker/test_manager.py @@ -22,7 +22,7 @@ async def test_run_command_success(docker: DockerAPI): # Execute the command result = docker.run_command( - image="alpine", tag="3.18", command="echo hello", stdout=True, stderr=True + image="alpine", version="3.18", command="echo hello", stdout=True, stderr=True ) # Verify the result