#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 EXPOSE 443 EXPOSE 54088 EXPOSE 2222 WORKDIR /app RUN apt-get update \ && apt-get install -y --no-install-recommends dialog \ && apt-get install -y --no-install-recommends openssh-server \ && apt-get install -y tcpdump\ && mkdir -p /run/sshd \ && echo "root:Docker!" | chpasswd COPY sshd_config /etc/ssh/sshd_config RUN apt-get update \ && apt-get install -y cron \ && apt-get install -y vim \ && apt-get install -y zip COPY schedule . RUN crontab schedule RUN echo 'net.ipv4.tcp_rmem= 10240 87380 12582912' >> /etc/sysctl.conf RUN echo 'net.ipv4.tcp_wmem= 10240 87380 12582912' >> /etc/sysctl.conf RUN echo 'net.ipv4.tcp_window_scaling = 1' >> /etc/sysctl.conf FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj", "EVCB_OCPP.WSServer/"] RUN dotnet restore "EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj" COPY . . WORKDIR "/src/EVCB_OCPP.WSServer" RUN dotnet build "EVCB_OCPP.WSServer.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "EVCB_OCPP.WSServer.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . COPY entrypoint.sh /app/entrypoint.sh COPY ssha /app/ssha RUN chmod +x /app/entrypoint.sh CMD ["/app/entrypoint.sh"]