Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- #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:5.0 AS base
- RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
- RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
- RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
- RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
- RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- RUN echo Asia/Shanghai > /etc/timezone
- RUN cat /etc/localtime
- ENV TZ=Asia/Shanghai
- WORKDIR /app
- EXPOSE 9000
-
- FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
- WORKDIR /src
-
- COPY . .
-
- WORKDIR "/src/DataV"
- RUN dotnet build "DataV.csproj" -c Release -o /app/build
-
- FROM build AS publish
- RUN dotnet publish "DataV.csproj" -c Release -o /app/publish
-
- FROM base AS final
- WORKDIR /app
- COPY --from=publish /app/publish .
-
- ENV ASPNETCORE_URLS http://+:9000
-
- ENTRYPOINT ["dotnet", "DataV.dll"]
|