FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app RUN git clone https://gitlab.tesses.net/tesses50/tytd_proxy . WORKDIR /app/TYTDProxy # Restore as distinct layers RUN dotnet restore # Build and publish a release RUN dotnet publish -c Release -o /app/out # Build runtime image FROM mcr.microsoft.com/dotnet/runtime:6.0 WORKDIR /app EXPOSE 3252 COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "TYTDProxy.dll","--docker"]