mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【新增】增加docker构建文件dockerfile
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -62,6 +63,7 @@
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.31" />
|
||||
<PackageReference Include="NLog" Version="5.0.5" />
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
RUN apt-get update && apt-get install -y libgdiplus
|
||||
# <20><><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD>ռ<EFBFBD>
|
||||
WORKDIR /app
|
||||
|
||||
#<23><><EFBFBD><EFBFBD>Docker<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱪ¶<E2B1A9>Ķ˿<C4B6>
|
||||
EXPOSE 80
|
||||
|
||||
COPY ./ /app
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>µ<EFBFBD><C2B5>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD>ռ<EFBFBD>
|
||||
COPY . /app
|
||||
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9> ["dotnet","ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dll"] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD>
|
||||
#ʹ<><CAB9>ENTRYPOINT ["dotnet","ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dll"]
|
||||
#<23><>ʹ<EFBFBD><CAB9> CMD ["dotnet","ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dll"]
|
||||
ENTRYPOINT ["dotnet", "CoreCms.Net.Web.Admin.dll"]
|
||||
13
CoreCms.Net.Web.Admin/Dockerfile.original
Normal file
13
CoreCms.Net.Web.Admin/Dockerfile.original
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
|
||||
RUN apt-get update && apt-get install -y libgdiplus
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
COPY ./ /app
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
ENTRYPOINT ["dotnet", "CoreCms.Net.Web.Admin.dll"]
|
||||
@@ -1,12 +1,4 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:1987",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
@@ -22,6 +14,20 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:5000"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true
|
||||
}
|
||||
},
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:1987",
|
||||
"sslPort": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user