2

I'm currently using resource: container in azure pipeline to pull my custom image tools from ACR, and use this image to create a container than can run several CLI commands on my pipeline.

Pulling this custom image tools takes so much time, roughly around 5mins and I want to avoid that as it is considered as a wasted time and a blockage since I do debugging most of the time.

Question: Is it possible to create an Azure Container Instance that constantly run my custom image tools then call this container inside my pipeline to run some cli commands?

I'm having a hard time finding documentation, so I'm not really sure if it is possible.

1 Answer 1

1

You can try to set up a self-hosted agent in your custom Docker image, and when running the container on ACI, it will install the agent and connect it to your Azure DevOps.

Then, you can use this self-hosted agent to run your pipeline job which needs to run the CLI commands. Since the self-hosted agent is hosted in the container, the job runs on the self-hosted agent will run in the container.

About how to configure set up self-hosted agent in Docker image, you can reference the document "Run a self-hosted agent in Docker".

Sign up to request clarification or add additional context in comments.

2 Comments

Hi @Oats, I have not heard from you for a long time. Just want to say hi and whether you have received my answer? Are the suggestions in my answer helpful for you? As suggested in my answer, you can try to set up a self-hosted agent in your custom Docker image. Then when running the container on ACI, it will install the agent and connect it to your Azure DevOps.
Hi, I have tried this, but I can't reuse the container again for the same build. I have to delete and spawn a new one in ACI to have it working again. Any idea on what to do next, or is there something I'm doing wrong?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.