Skip to content

Commit

Permalink
Fix RUNTIME_IDENTIFIER for accountingservice (#1812)
Browse files Browse the repository at this point in the history
* Fix RUNTIME_IDENTIFIER for accountingservice

* Set the correct RID for cartservice

* Add TARGETARCH to publish step

---------

Co-authored-by: Juliano Costa <[email protected]>
  • Loading branch information
pjanotti and julianocosta89 authored Dec 5, 2024
1 parent f925282 commit 34df1c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/accountingservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["/src/accountingservice/", "AccountingService/"]
COPY ["/pb/demo.proto", "AccountingService/proto/"]
RUN dotnet restore "./AccountingService/AccountingService.csproj" -r linux-musl-$TARGETARCH
RUN dotnet restore "./AccountingService/AccountingService.csproj" -r linux-$TARGETARCH
WORKDIR "/src/AccountingService"

RUN dotnet build "./AccountingService.csproj" -r linux-musl-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "./AccountingService.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/build

# -----------------------------------------------------------------------------

FROM builder AS publish
ARG TARGETARCH
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./AccountingService.csproj" --use-current-runtime -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "./AccountingService.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

# -----------------------------------------------------------------------------

Expand Down

0 comments on commit 34df1c3

Please sign in to comment.