0
votes

I want to programmatically deploy a new docker container on demand from an existing image from an azure function app (e.g. from a cosmodb trigger). Can someone provide some guidance? I'm having difficulty finding any documentation as all my searches bring up running an azure function within a container, which isn't what I'm trying to do.

edit further clarification in my use case, i am using a cosmosdb trigger in a function app. When that cosmosdb collection gets a new record, I extract a string from that record, and then pass that string as a run parameter to dynamically create a new docker container from an existing ACR image.

I am thinking I'll have to use powershell within the function app to do this, I was hoping there would be a C# solution.

1
What do you mean by deploying a docker container from the Azure function app? deploy the container inside the function or deploy the function from the image?Charles Xu
There is an azure container instances (ACI) connector in logic apps - which might be an option if your workflow is fairly simple. Otherwise, you might have to look into some of the sdks and configure it yourself.mmking
@CharlesXu I modified the question to be a bit more specificNoCarrier
It seems you can create a trigger via C# that create an ACI with the image from ACR. I think it's not a problem.Charles Xu

1 Answers

0
votes

What you can do is create an Azure devops pipeline to deploy your new container. Then trigger the running of the pipeline from your function app.