Deploy existing docker container from Azure Container Registry to Azure App Service #19543
Unanswered
Nick Ganter (nickyg91)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to deploy an existing container that was built in a separate CI pipeline and pushed to an existing ACR? When using the
AddContainerextension the Azure App Service and the corresponding prepare slot are not created.Is this by design? Am I thinking about this all wrong? Or am I trying to use .NET Aspire in a way it isn't meant to be used?
I want to build the container separately and have aspire orchestrate the azure resource creation and deploy the docker image built in a CI pipeline to the Azure App Service it configures.
Below is an example of what I am doing in Aspire. This deploys "successfully" but does not actually deploy the App Service in the resource group that is created. I've omitted the slot configuration code for brevity.
Edit: I forgot to mention I do have a workaround for this, but it isn't super ideal.
I have a base dockerfile that actually tags an ARG as the source image from the existing ARC source - this gets around the App Service not deploying but still requires some container to be built by Aspire during
aspire deploy.The workaround uses the
AddDockerfile().WithBuildArg(...)extension calls and a dockerfile with the below contents in it.All reactions