Dockerfile 919 B

12345678910111213141516171819202122
  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:7.0 AS base
  3. RUN sed -i 's/TLSv1.2/TLSv1/g' /etc/ssl/openssl.cnf
  4. RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
  5. WORKDIR /app
  6. FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
  7. WORKDIR /src
  8. COPY ["EVCB_OCPP.TaskScheduler/EVCB_OCPP.TaskScheduler.csproj", "EVCB_OCPP.TaskScheduler/"]
  9. RUN dotnet restore "EVCB_OCPP.TaskScheduler/EVCB_OCPP.TaskScheduler.csproj"
  10. COPY . .
  11. WORKDIR "/src/EVCB_OCPP.TaskScheduler"
  12. RUN dotnet build "EVCB_OCPP.TaskScheduler.csproj" -c Release -o /app/build
  13. FROM build AS publish
  14. RUN dotnet publish "EVCB_OCPP.TaskScheduler.csproj" -c Release -o /app/publish /p:UseAppHost=false
  15. FROM base AS final
  16. WORKDIR /app
  17. COPY --from=publish /app/publish .
  18. ENTRYPOINT ["dotnet", "EVCB_OCPP.TaskScheduler.dll"]