Hello, is there a way to pass "--add-host=host.doc...
# general
p
Hello, is there a way to pass "--add-host=host.docker.internal:host-gateway" to docker_environment used for running tests? We have a set of component tests, started by bash script, that 1) runs services using docker compose, exposing tested service on a port that's accessible from host OS 2) triggers
pants tests path/to/tests::
with BUILD file for tests containing env variables like
SERVICE_HOST=hostname
that are read by tests and used to connected to tested service run by compose. Now, those component tests work in docker_environment, which means they are run in docker container with network mode set to bridge by default probably? On Mac, using docker desktop, it's enough to set
SERVICE_HOST=host.docker.internal
to make the connection work. On linux, I need to pass custom option
"--add-host=host.docker.internal:host-gateway"
to docker run. There's pants.toml docker.run_args section, but it looks like this is only used when I do
pants run path/to/docker_target
and not when running environments?