Skip to content
Snippets Groups Projects
Commit d7fd767c authored by Zsombor Welker's avatar Zsombor Welker
Browse files

Use an explicit prefix check

... to avoid cases where the hostname is contained within the
container_id, but is not the actual prefix.
parent cda2cdbf
Branches
Tags
No related merge requests found
...@@ -51,7 +51,7 @@ class DockerWatcher(Thread): ...@@ -51,7 +51,7 @@ class DockerWatcher(Thread):
# if no explicit --hostname is provided, than it will be the first 12 characters of the container_id. # if no explicit --hostname is provided, than it will be the first 12 characters of the container_id.
# In that case, the hostname can be ignored # In that case, the hostname can be ignored
if hostname not in container_id: if hostname != container_id[:12]:
if len(domain) > 0: if len(domain) > 0:
common_hostnames.append('%s.%s' % (hostname, domain)) common_hostnames.append('%s.%s' % (hostname, domain))
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment