|
@@ -1,11 +1,26 @@
|
|
|
#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
|
|
|
+FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base
|
|
|
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
|
|
|
+
|
|
|
+RUN apt-get update \
|
|
|
+ && apt-get install -y --no-install-recommends dialog \
|
|
|
+ && apt-get install -y --no-install-recommends openssh-server \
|
|
|
+ && mkdir -p /run/sshd \
|
|
|
+ && echo "root:Docker!" | chpasswd
|
|
|
+
|
|
|
+COPY sshd_config /etc/ssh/sshd_config
|
|
|
+
|
|
|
+# Install dotnet debug tools
|
|
|
+RUN dotnet tool install --tool-path /tools dotnet-trace \
|
|
|
+ && dotnet tool install --tool-path /tools dotnet-counters \
|
|
|
+ && dotnet tool install --tool-path /tools dotnet-dump \
|
|
|
+ && dotnet tool install --tool-path /tools dotnet-gcdump
|
|
|
+
|
|
|
EXPOSE 80
|
|
|
EXPOSE 443
|
|
|
-EXPOSE 54088
|
|
|
+EXPOSE 2222
|
|
|
WORKDIR /app
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
|
@@ -26,4 +41,4 @@ RUN dotnet publish "EVCB_OCPP.WSServer.csproj" -c Release -o /app/publish /p:Use
|
|
|
FROM base AS final
|
|
|
WORKDIR /app
|
|
|
COPY --from=publish /app/publish .
|
|
|
-ENTRYPOINT ["dotnet", "EVCB_OCPP.WSServer.dll"]
|
|
|
+ENTRYPOINT ["/bin/bash", "-c", "/usr/sbin/sshd && dotnet EVCB_OCPP.WSServer.dll"]
|