mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:03:25 +08:00
【新增】增加docker构建文件dockerfile
This commit is contained in:
25
.dockerignore
Normal file
25
.dockerignore
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
||||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||||
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
|
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
<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="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.31" />
|
<PackageReference Include="MySql.Data" Version="8.0.31" />
|
||||||
<PackageReference Include="NLog" Version="5.0.5" />
|
<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
|
WORKDIR /app
|
||||||
|
|
||||||
|
#<23><><EFBFBD><EFBFBD>Docker<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱪ¶<E2B1A9>Ķ˿<C4B6>
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
COPY ./ /app
|
#<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
|
||||||
ENV TZ=Asia/Shanghai
|
|
||||||
|
|
||||||
|
#<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"]
|
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": {
|
"profiles": {
|
||||||
"IIS Express": {
|
"IIS Express": {
|
||||||
"commandName": "IISExpress",
|
"commandName": "IISExpress",
|
||||||
@@ -22,6 +14,20 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:5000"
|
"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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
||||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||||
<UserSecretsId>077906fd-e490-4431-9bae-c3a48ae21992</UserSecretsId>
|
<UserSecretsId>077906fd-e490-4431-9bae-c3a48ae21992</UserSecretsId>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||||
|
<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="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.31" />
|
<PackageReference Include="MySql.Data" Version="8.0.31" />
|
||||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
# <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
|
WORKDIR /app
|
||||||
|
|
||||||
|
#<23><><EFBFBD><EFBFBD>Docker<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱪ¶<E2B1A9>Ķ˿<C4B6>
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
COPY ./ /app
|
#<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
|
||||||
ENV TZ=Asia/Shanghai
|
|
||||||
|
|
||||||
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
|
|
||||||
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
|
|
||||||
|
|
||||||
|
#<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.WebApi.dll"]
|
ENTRYPOINT ["dotnet", "CoreCms.Net.Web.WebApi.dll"]
|
||||||
14
CoreCms.Net.Web.WebApi/Dockerfile.original
Normal file
14
CoreCms.Net.Web.WebApi/Dockerfile.original
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
COPY ./ /app
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
|
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
|
||||||
|
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "CoreCms.Net.Web.WebApi.dll"]
|
||||||
@@ -1,13 +1,4 @@
|
|||||||
{
|
{
|
||||||
"iisSettings": {
|
|
||||||
"windowsAuthentication": false,
|
|
||||||
"anonymousAuthentication": true,
|
|
||||||
"iisExpress": {
|
|
||||||
"applicationUrl": "http://localhost:2015",
|
|
||||||
"sslPort": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"IIS Express": {
|
"IIS Express": {
|
||||||
"commandName": "IISExpress",
|
"commandName": "IISExpress",
|
||||||
@@ -23,6 +14,21 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:5000"
|
"applicationUrl": "http://localhost:5000"
|
||||||
|
},
|
||||||
|
"Docker": {
|
||||||
|
"commandName": "Docker",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||||
|
"publishAllPorts": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:2015",
|
||||||
|
"sslPort": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user