use-case:
The host runs an integration test for a container that involves checking whether a webhook is called by the container or not.
On my local machine, I can use host.docker.internal
as the hostname for the docker host.
On Travis this does not work. I tried adding the following to my travis configuration, but it did not change anything:
addons:
hosts:
- host.docker.internal
Alternative Approach:
An alternative would be to run the tests inside a container aswell (and link those via a bridge network), however, as this is done for a framework that needs to support both I would like to have a solution that allows running tests inside an docker container aswell as outside a docker container. Since this is already possible with Docker Desktop (using host.docker.internal), I assume there must be a way to do the same with travis.