mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-05-09 12:07:21 +08:00
【新增】增加docker构建文件dockerfile
This commit is contained in:
@@ -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.
|
||||
|
||||
# 添加基础镜像
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
|
||||
#容器中系统的工作空间
|
||||
WORKDIR /app
|
||||
|
||||
#设置Docker容器对外暴露的端口
|
||||
EXPOSE 80
|
||||
|
||||
COPY ./ /app
|
||||
#拷贝当前文件夹下的文件到容器中系统的工作空间
|
||||
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"]
|
||||
#容器中使用 ["dotnet","系统启动的dll"] 来运行应用程序
|
||||
#使用ENTRYPOINT ["dotnet","系统启动的dll"]
|
||||
#或使用 CMD ["dotnet","系统启动的dll"]
|
||||
ENTRYPOINT ["dotnet", "CoreCms.Net.Web.WebApi.dll"]
|
||||
|
||||
Reference in New Issue
Block a user