#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/sdk:7.0 AS final
EXPOSE 80
EXPOSE 443
EXPOSE 54088
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 /src
COPY . .
RUN export DOTNET_PerfMapEnabled=1
RUN dotnet build ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj
CMD ["dotnet", " run --project ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj"]