Job runs multiple times when running Docker Agent in Azure Container Instance

Hi all,

I was wondering if anyone has come across a similar issue before and has any advice in order to help resolve this.

I’m using the latest agent from docker hub and have pushed this with the selenium chrome image to an Azure Container Repository, in order to run Web Tests against Chrome. Using Docker and ACI I’m able to start a new Container Instance via docker compose and the below docker-compose.yaml file.

This starts up and registers an agent, however when I include my Job ID (currently commented out) the Job runs and completes as expected, but then the same Job starts up again, runs, completes and this continuously occurs with the Job being run.

Any help with this would be greatly appreciated.


Hi, @n.c ,

I want to clarify some things related to this container:

  1. Why are you specifically running it on an azure container?

  2. Also, it seems to be that the option to terminate this container is by setting -compose down.

More details about this scenario will be helpful.

Hi @alex.ivanov

Thanks for your reply.

  1. I was investigating integrating agents within our existing cloud infrastructure. I think at present we won’t be pursing the use of container instances and will likely opt for local agents instead.

  2. Yes, using the compose down command was removing the container and the agent, however the same job was being repeatedly run when using the compose up command and I was having to use the api to determine when the job had finished executing then using compose down command. I suspect the behaviour may have possibly been down to health checks on the container instance.

As I won’t be implementing this scenario and will be using local agents this won’t require further investigation.
Thanks again for the support

You are welcome.
We are also available in the support chat if you have any other issues.

1 Like