Reputation: 387
today has been my first attempt regarding using Docker in Azure.
I created a simple MVC app in .net core 2.0. I'd successfully installed Docker for windows as was able to run the app successfully locally in a container.
My next approach was to see if i could publish to app to Azure. (I did choose add docker when creating the project).
So from the solution I right clicked and choose 'Publish' to an Azure Container.
When looking in azure I can see that it has uploaded to a Container Registry. It then gives me a url of https://costasdockertest.azurecr.io/ but when hitting the url I get a page not found.
Usually when uploading a an to an Azure App Serivce i would get a url like http://sampleapp.azurewebsites.net.
Not sure if i have missed something. I would have thought that publishing the app to a container in release mode the app should be displayed.
Thoughs?
Thank you
Upvotes: 1
Views: 720
Reputation: 18465
Based on your description, you have pushed the image to ACR (Azure Container Registry) for storing your docker images as Tamás Huj mentioned. Then, you could create your Azure Container Instances (ACI) to instantiate your image and host your application. Detailed tutorial, you could follow Modernizing your existing ASP.NET Apps with Azure.
Also, you could use Web App for Containers and configure the Docker container to use the image from your ACR, details you could follow Create an Azure web app to host a container and Deploying ASP.NET Core 2.0 App to Azure using Docker.
Upvotes: 1
Reputation: 1570
Container Registry is used to store your docker images, and not for hosting your containers.
This demo describes how to use a custom Docker image for Web App: https://learn.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image
Upvotes: 0