Dockerfile2 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. EXPOSE 80
  4. EXPOSE 443
  5. EXPOSE 2222
  6. RUN sed -i 's/TLSv1.2/TLSv1/g' /etc/ssl/openssl.cnf
  7. RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
  8. RUN apt-get update \
  9. && apt-get install -y --no-install-recommends dialog \
  10. && apt-get install -y --no-install-recommends openssh-server \
  11. && mkdir -p /run/sshd \
  12. && echo "root:Docker!" | chpasswd
  13. COPY sshd_config /etc/ssh/sshd_config
  14. # Install dotnet debug tools
  15. RUN dotnet tool install --tool-path /tools dotnet-trace \
  16. && dotnet tool install --tool-path /tools dotnet-counters \
  17. && dotnet tool install --tool-path /tools dotnet-dump \
  18. && dotnet tool install --tool-path /tools dotnet-gcdump
  19. RUN apt update
  20. RUN apt install -y linux-perf
  21. #RUN echo 0 > /proc/sys/kernel/kptr_restrict
  22. WORKDIR /src
  23. COPY . .
  24. RUN export DOTNET_PerfMapEnabled=1
  25. RUN dotnet build ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj
  26. CMD dotnet run --project ./EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj