From 489d717cbf27bd94fe501ee208e357dc8952e5b7 Mon Sep 17 00:00:00 2001 From: Thomas Schissler Date: Mon, 18 Sep 2023 20:56:48 +0200 Subject: [PATCH] Update Dockerfile --- TestService/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TestService/Dockerfile b/TestService/Dockerfile index 9a8582c..351c4d3 100644 --- a/TestService/Dockerfile +++ b/TestService/Dockerfile @@ -5,7 +5,7 @@ USER app WORKDIR /app EXPOSE 8080 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build # Install clang/zlib1g-dev dependencies for publishing to native RUN apt-get update \ && apt-get install -y --no-install-recommends \ @@ -15,16 +15,16 @@ ARG TARGETARCH WORKDIR /src COPY ["NuGet.config", "."] COPY ["TestService/TestService.csproj", "TestService/"] -RUN dotnet restore "TestService/TestService.csproj" -a $TARGETARCH +RUN dotnet restore "TestService/TestService.csproj" COPY . . WORKDIR "/src/TestService" -RUN dotnet build "TestService.csproj" -c $BUILD_CONFIGURATION -o /app/build -a $TARGETARCH +RUN dotnet build "TestService.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish RUN dotnet publish "TestService.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=true -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/runtime-deps:8.0 AS final +FROM mcr.microsoft.com/dotnet/runtime-deps:8.0 AS final WORKDIR /app EXPOSE 8080 COPY --from=publish /app/publish . -ENTRYPOINT ["./TestService"] \ No newline at end of file +ENTRYPOINT ["./TestService"]