I am running an Azure Container Job, where I spin up a different Docker container manually like this:
jobs:
- job: RunIntegrationTests
pool:
vmImage: "ubuntu-18.04"
container:
image: mynamespace/frontend_image:latest
endpoint: My Docker Hub Endpoint
steps:
- script: |
docker run --rm --name backend_container -p 8000:8000 -d backend_image inv server
I have to create the container manually since the image lives in AWS ECR, and the password authentication scheme that Azure provides for it can only be used with a token that expires, so it seems useless. How can I make it so that my_container is reachable from within subsequent steps of my job?. I have tried starting my job with:
options: --network mynetwork
And share it with "backend_container", but I get the error:
docker: Error response from daemon: Container cannot be connected to network endpoints: mynetwork
While starting the "frontend" container, which might be because Azure is trying to start a container on multiple networks.