Skip to content

Commit

Permalink
Specify target arch in dotnet publish
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanBout committed Nov 23, 2024
1 parent aee2be9 commit 0d79c00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SimpleCDN/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ RUN dotnet restore "./SimpleCDN/SimpleCDN.csproj"
COPY . .
WORKDIR "/src/SimpleCDN"
RUN apt update && apt install -y clang zlib1g-dev
RUN dotnet build "./SimpleCDN.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "./SimpleCDN.csproj" -c $BUILD_CONFIGURATION -r $BUILDPLATFORM -o /app/build

# This stage is used to publish the service project to be copied to the final stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./SimpleCDN.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "./SimpleCDN.csproj" -c $BUILD_CONFIGURATION -r $BUILDPLATFORM -o /app/publish /p:UseAppHost=false

# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
FROM base AS final
Expand Down

0 comments on commit 0d79c00

Please sign in to comment.