增加docker初步支持

This commit is contained in:
2020-07-20 18:52:50 +08:00
parent 1f8e2b1e6e
commit 14a43efb67
3 changed files with 35 additions and 0 deletions
+2
View File
@@ -2,11 +2,13 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="2.7.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
<PackageReference Include="MimeKit" Version="2.8.0" />
<PackageReference Include="MySql.Data" Version="8.0.20" />
+8
View File
@@ -0,0 +1,8 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
COPY . .
ENTRYPOINT ["dotnet", "COMCMS.Web.dll"]