create container info func

This commit is contained in:
2026-01-01 18:20:01 -08:00
parent 2d078648c2
commit f275203955
2 changed files with 13 additions and 0 deletions

View File

@@ -124,6 +124,19 @@ class Composer:
services_dict = self.docker.compose.config().services services_dict = self.docker.compose.config().services
self.services = {service: Service(service, services_dict[service].labels, self) for service in services_dict} self.services = {service: Service(service, services_dict[service].labels, self) for service in services_dict}
def get_container_info(self):
"""Gets the docker container info
Returns:
A docker container if it exists, if not returns None.
"""
container = self.parent.docker.compose.ps(services=[self.name])
if not container:
return None
return container[0]
def start_update_job(self): def start_update_job(self):
"""Schedules a recurring update based on the UPDATE environment variable """Schedules a recurring update based on the UPDATE environment variable

0
composer/connector.py Normal file
View File