Dockerfile_dev 1.2 KB

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