mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-23 09:06:29 +00:00
Change handling for taging
This commit is contained in:
parent
aa49498ac0
commit
3abb11dab6
@ -40,10 +40,9 @@ class DockerBase(object):
|
||||
"""
|
||||
try:
|
||||
_LOGGER.info("Pull image %s tag %s", self.image, tag)
|
||||
self.dock.images.pull(self.image, tag=tag)
|
||||
image = self.dock.images.pull(self.image, tag=tag)
|
||||
|
||||
if tag != "latest":
|
||||
image = self.dock.images.get("{}:{}".format(self.image, tag))
|
||||
if tag != 'latest':
|
||||
image.tag(self.image, tag='latest')
|
||||
except docker.errors.APIError:
|
||||
_LOGGER.error("Can't pull %s:%s", self.image, tag)
|
||||
|
@ -5,6 +5,7 @@ import docker
|
||||
|
||||
from . import DockerBase
|
||||
from ..const import HASSIO_DOCKER
|
||||
from ..tools import get_version_from_env
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
HASS_DOCKER_NAME = 'homeassistant'
|
||||
@ -51,6 +52,9 @@ class DockerHomeAssistant(DockerBase):
|
||||
self.config.path_ssl_docker:
|
||||
{'bind': '/ssl', 'mode': 'rw'},
|
||||
})
|
||||
|
||||
self.version = get_version_from_env(
|
||||
self.container.attrs['Config']['Env'])
|
||||
except docker.errors.DockerException:
|
||||
_LOGGER.error("Can't run %s", self.image)
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user