I have been using the.net core image of CentOS7 for a long time, and recently I found out that 8 has been released, so I want to update the environment. After all, many people have reported that there are some bugs in 7, so the problem that can be solved by updating the system is not a problem, because I did not write the system, haha, I can not find the bug.
Write your own Dockerfile
The format of Dockerfile is very simple, costs almost nothing to learn, and is extremely easy to build, so let’s start with this file.
#Upgrade to 8, simple, direct copy of centos7 image file
FROM centos:8
#Create your own environment variables. Add the normal environment variables first to avoid using them empty
#For example, DOTNET_RUNNING_IN_CONTAINER can be used to check whether the program is running in a containerENV DOTNET_CORE_VERSION= 3.1dotnet_framework = netcoreApp3.1 # Microsoft's images set this to enable detecting when an app is running in a container. DOTNET_RUNNING_IN_CONTAINER=true \Copy the code