## Introduction
linux popular today surely we have embraced core of it, the usual solutions are gitlab + jenkins + centos, but such a scheme is not suitable for my kind of lazy, we have been seeking a simple solution, in the search for solutions in We found that the current domestic third party is not friendly enough for c # ah, did not find easy to use, so I think Azure, MS have to say was quite to the edge.
Essential list
- == GitHub> GitHub Getting Started Tutorial
- Azure DevOps 注册=》https://azure.microsoft.com/zh-cn/services/devops/
- Ali cloud container mirror service https://cr.console.aliyun.com/cn-hangzhou/instances/repositories
- Server ps: pull out the 299-year Ali cloud ECS
- Open VS, newly built
ASP.NET Core Web 应用程序
, namedWebNotebook
- Click Next, remember to enable support Docker, click Create
- If the previous step does not click Enable Docker support, by adding to the new
- Push to the code GitHub
Here is my configuration file Docker
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
RUN ls -al
COPY ["WebNotebook/WebNotebook.csproj", "WebNotebook/"]
RUN dotnet restore "WebNotebook/WebNotebook.csproj"
COPY . .
WORKDIR "/src/WebNotebook"
RUN dotnet build "WebNotebook.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "WebNotebook.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "WebNotebook.dll"]
The following is a Demo of my project