testcontainers / testcontainers-hs

Docker containers for your integration tests! http://hackage.haskell.org/package/testcontainers
MIT License
58 stars 13 forks source link

Detect a run within Docker #22

Closed michivi closed 1 year ago

michivi commented 1 year ago

This PR detects whether the running test is running in a Docker container and acts accordingly:

This is required as some CI engine may choose to (or be configured to) run the test in a container. As such, localhost won't be usable to connect to the container as it would represent the test container itself.

michivi commented 1 year ago

Sorry, forgot to export containerGateway 😅

alexbiehl commented 1 year ago

Thanks!