Skip to content

Commit

Permalink
adding support for host dns mapping in docker swarm operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Black committed Oct 20, 2024
1 parent d3be15e commit 96e961a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def __init__(
container_resources: types.Resources | None = None,
logging_driver: Literal["json-path", "gelf"] | None = None,
logging_driver_opts: dict | None = None,
hosts: dict[str, str] | None = None,
**kwargs,
) -> None:
super().__init__(image=image, **kwargs)
Expand All @@ -149,6 +150,7 @@ def __init__(
self.container_resources = container_resources or types.Resources(mem_limit=self.mem_limit)
self.logging_driver = logging_driver
self.logging_driver_opts = logging_driver_opts
self.hosts = hosts or {}

if self.logging_driver:
supported_logging_drivers = ("json-file", "gelf")
Expand Down Expand Up @@ -176,6 +178,7 @@ def _run_service(self) -> str | None:
env=self.environment,
user=self.user,
tty=self.tty,
hosts=self.hosts,
configs=self.configs,
secrets=self.secrets,
),
Expand Down

0 comments on commit 96e961a

Please sign in to comment.