If a service uses host networking mode and you define a public port
for the purpose of healthchecking, the stop container call fails because
no such port is actually mapped.
This workaround allows you to define a "dummy" port that won't be mapped
(since host mode doesn't do that) but still satisfies the
wait_for_health_check_ok semantics by passing the port through.
It is a little weird that centurion "thinks" the port mappings exist
without docker actually creating them.
Seems legit. I agree that it's a weird implementation, but it does seem like the most natural way to solve the problem currently without a noticeable (probably low value) refactor.
If a service uses host networking mode and you define a public port for the purpose of healthchecking, the stop container call fails because no such port is actually mapped.
This workaround allows you to define a "dummy" port that won't be mapped (since host mode doesn't do that) but still satisfies the wait_for_health_check_ok semantics by passing the port through.
It is a little weird that centurion "thinks" the port mappings exist without docker actually creating them.
Resolves #164.