My goal: I'll commit a PR for a repo that triggers a GA Workflow. This includes building the Docker image for that repo along with other images.
All of their images are built by checking out their repos b/c my team wants to avoid pulling their images. Thus, I cannot use the service-containers workflow setup since it requires pulling images from Docker Hub or AWS ECR.
When running my GA Workflow, after docker-composing my containers, I'm unable to get feeds from my Docker Container's url (image://container-name:port/rest/of/path
). Instead, I see this error ECONNREFUSED 127.0.0.1:80
Other attempts:
- Using http:/localhost:port/rest/of/path. Got same error
ECONNREFUSED 127.0.0.1:80
- Using the Docker Container's IP http:docker.ip:port/rest/of/path. Got different error
Error: connect EHOSTUNREACH 172.18.0.6:8088 at TCPConnectWrap.afterConnect
- Create a Docker image of my tests, adding to the docker-compose file, and repeating the above steps. Same errors.
If this provides more context, I added a template of my docker-compose.yml below. Each of them except the db images have a repo. They depend on each other as follows
Containers: C -> B + A -> db
*tests run against C
I start my GA workflow like below:
- Start a PR for C and it triggers the GA Workflow
- Checkout each of the above repos (except db, that’s public)
- Build each of their images and then
docker-compose up
- Checkout my tests repo and run them against the C’s localhost url's feeds (C://C:3333/rest/of/path).
version: "3"
services:
db:
image: mongo:latest
container_name: db
db-seed:
image: mongo:latest
container_name: db_seed
links:
- db
volumes_from:
- db
command:
/import.sh
A:
image: ecr-aws/A
container_name: api
ports:
- 1111:1111
env_file:
- 'A/.env'
depends_on:
- db
B:
image: ecr-aws/B
container_name: B
ports:
- 2222:2222
env_file:
- 'B/.env'
depends_on:
- db
C:
image: ecr-aws/C
container_name: C
ports:
- 3333:3333
env_file:
- 'C/.env'
depends_on:
- A