I am running my CI/CD pipeline in Google cloud build. My app has web
and wget
containers. I am trying to reach web
from wget
<
I had a similar issue setting up integration tests on cloud build. I was trying to run integration tests from another builder (go-builder) against my other containers (started through docker-compose community built containers).
Without specifying any networks on docker-compose.yaml, all containers are started on the default network (https://docs.docker.com/compose/networking/). On cloud build, it creates a new network named cloudbuild_default and places all my containers there. By forcing all containers to join cloudbuild network through my docker-compose.yaml file, I was able to establish communications and run my tests against them.
#docker-compose.yaml
networks:
default:
external:
name: cloudbuild
This might be an alternate configuration for you. Hope it helps