Dockerfile_dev2 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/sdk:7.0 AS final
  3. ENV COMPlus_PerfMapEnabled=1
  4. ENV COMPlus_EnableEventLog=1
  5. EXPOSE 80
  6. EXPOSE 443
  7. EXPOSE 54088
  8. EXPOSE 2222
  9. #RUN sed -i 's/TLSv1.2/TLSv1/g' /etc/ssl/openssl.cnf
  10. #RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
  11. RUN apt-get update \
  12. && apt-get install -y --no-install-recommends dialog \
  13. && apt-get install -y --no-install-recommends openssh-server \
  14. && apt-get install -y tcpdump\
  15. && mkdir -p /run/sshd \
  16. && echo "root:Docker!" | chpasswd
  17. COPY sshd_config /etc/ssh/sshd_config
  18. # Install dotnet debug tools
  19. RUN dotnet tool install --tool-path /tools dotnet-trace \
  20. && dotnet tool install --tool-path /tools dotnet-counters \
  21. && dotnet tool install --tool-path /tools dotnet-dump \
  22. && dotnet tool install --tool-path /tools dotnet-gcdump
  23. #RUN apt update
  24. #RUN apt install -y linux-perf
  25. #RUN echo 0 > /proc/sys/kernel/kptr_restrict
  26. WORKDIR /src
  27. COPY . .
  28. #RUN export DOTNET_PerfMapEnabled=1
  29. RUN dotnet restore "EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj"
  30. #RUN dotnet build ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj
  31. RUN dotnet publish ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj -r linux-x64 -c Release -o /app/publish --self-contained
  32. RUN chmod +x /src/entrypoint.sh
  33. CMD ["/src/entrypoint.sh"]