You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
1.0 KiB

  1. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
  3. RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
  4. RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
  5. RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
  6. RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
  7. RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  8. RUN echo Asia/Shanghai > /etc/timezone
  9. RUN cat /etc/localtime
  10. ENV TZ=Asia/Shanghai
  11. WORKDIR /app
  12. EXPOSE 9000
  13. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  14. WORKDIR /src
  15. COPY . .
  16. WORKDIR "/src/DataV"
  17. RUN dotnet build "DataV.csproj" -c Release -o /app/build
  18. FROM build AS publish
  19. RUN dotnet publish "DataV.csproj" -c Release -o /app/publish
  20. FROM base AS final
  21. WORKDIR /app
  22. COPY --from=publish /app/publish .
  23. ENV ASPNETCORE_URLS http://+:9000
  24. ENTRYPOINT ["dotnet", "DataV.dll"]