This commit is contained in:
h z
2025-05-04 19:11:12 +01:00
parent fc4ef3b0f8
commit 58d9c333e0
10 changed files with 332 additions and 178 deletions

View File

@@ -5,6 +5,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY NuGet.Config ./
COPY ["*.sln", "."]
COPY ["Alchegos.MCP.csproj", "./"]
RUN dotnet restore "Alchegos.MCP.csproj"
@@ -19,4 +20,14 @@ RUN dotnet publish "./Alchegos.MCP.csproj" -c $BUILD_CONFIGURATION -o /app/publi
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Alchegos.MCP.dll"]
USER root
RUN apt-get update
RUN apt-get install -y --no-install-recommends openssh-client openssh-server
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/run/sshd
RUN sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]