1, the project released
2. Create a folder in linux system, / opt / site /, and place the project folder.
3. Create dockerfile file also placed under / opt / site / directory
FROM microsoft/dotnet:2.1-aspnetcore-runtime
COPY ./coreTest /app
WORKDIR /app
EXPOSE 9099
CMD ["dotnet", "CoreTest.dll", "--server.urls"]
docker commonly used commands: https://blog.csdn.net/qq_26900081/article/details/88599662
4, to build the mirror and the container
docker build -t coretest01:v1 .
docker run --name coretest -d -p 8088:9099 coretest01:v1
coretest01 mirror image of what we want; microsoft / dotnet base image is arranged in the FROM dockerfile sentence, it does not exist will be created automatically pull in a remote warehouse.
I configured the IP project started in 9099 is the code, the default port number set in the container so here in 9099 also.
5, access the browser http://192.168.119.128:8088 both can see the stuff you want. IP and port are the linux. Remember linux open firewall port number oh