diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index 7b7d534311..d1bbffbc10 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -23,15 +23,9 @@ WORKDIR /usr/src/app/ COPY ./src/cartservice/ ./ COPY ./pb/ ./src/protos/ -RUN \ - RUNTIME_IDENTIIFER=linux-musl-x64; \ - if [ "${TARGETARCH}" = "arm64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \ - dotnet restore ./src/cartservice.csproj -v d -r $RUNTIME_IDENTIIFER - -RUN \ - RUNTIME_IDENTIIFER=linux-musl-x64; \ - if [ "${TARGETARCH}" = "arm64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \ - dotnet publish ./src/cartservice.csproj -v d -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore +RUN dotnet restore ./src/cartservice.csproj -v d -r linux-musl-$TARGETARCH + +RUN dotnet publish ./src/cartservice.csproj -v d -r linux-musl-$TARGETARCH --no-restore -o /cartservice # ----------------------------------------------------------------------------- diff --git a/src/cartservice/src/cartservice.csproj b/src/cartservice/src/cartservice.csproj index 799010ec16..0ec47586d5 100644 --- a/src/cartservice/src/cartservice.csproj +++ b/src/cartservice/src/cartservice.csproj @@ -4,6 +4,9 @@ net8.0 false false + true + true + false