#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 EXPOSE 80 RUN sed -i 's/TLSv1.2/TLSv1/g' /etc/ssl/openssl.cnf RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["EVCB_OCPP.TaskScheduler/EVCB_OCPP.TaskScheduler.csproj", "EVCB_OCPP.TaskScheduler/"] RUN dotnet restore "EVCB_OCPP.TaskScheduler/EVCB_OCPP.TaskScheduler.csproj" COPY . . WORKDIR "/src/EVCB_OCPP.TaskScheduler" RUN dotnet build "EVCB_OCPP.TaskScheduler.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "EVCB_OCPP.TaskScheduler.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "EVCB_OCPP.TaskScheduler.dll"]