I am working on a project which is based on ASP.NET Core 2.2.8, and I am planning to use docker for this project. The issue is I am getting this error when running the docker file
mcr.microsoft.com/dotnet/aspnet:2.2: not found
I have read some posts that .NET Core 2.2 is out of support and the images are removed. And the option is to upgrade the project. In my case I cannot upgrade the project from .NET Core 2.2. The reason is we are trying to use the Huawei cloud service stage, for that the supported .Net core versions are 2.0.9 and later, and versions earlier than 3.0
https://support.huaweicloud.com/intl/en-us/productdesc-servicestage/ss_productdesc_0001.html
Is there a way to add docker for my project?
2
Answers
We can use the alternative docker images from the docker hub.
Using the above mentioned images are simple and easy. I have created a test project and added the images. It is working fine
as you said, the 2.2 is no longer supported. As I was stuck in a similar situation in one of my projects, I used this image. It works fine but use it at your own risk.
As a plus, you can also use this
Dockerfile
for the base image of your project. It creates a big Docker image, but at least it works.Build it using this and use it in your project.