Skip to content

Commit

Permalink
fix warning as error NU1900 (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Renat Shajmardanov <[email protected]>
  • Loading branch information
Renat Shaymardanov and Renat Shajmardanov authored Dec 21, 2023
1 parent eeb6dda commit dd435f8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy as builder

# Must be linux/amd64 or linux/arm64
ARG TARGETARCH

COPY src ./src
COPY mysql-data-mover.sln .

ENV SOLUTION_NAME "./mysql-data-mover.sln"

RUN dotnet restore ${SOLUTION_NAME}
RUN dotnet build --no-restore --configuration Release ${SOLUTION_NAME}
RUN dotnet restore ${SOLUTION_NAME} --arch ${TARGETARCH} --packages /packages/${TARGETARCH}
RUN dotnet build --no-restore --source /packages/${TARGETARCH} --configuration Release ${SOLUTION_NAME}
RUN dotnet test --no-restore --configuration Release ${SOLUTION_NAME}
RUN dotnet publish --no-restore --configuration Release --property:PublishDir=/output ${SOLUTION_NAME}
RUN dotnet publish --no-restore --source /packages/${TARGETARCH} --configuration Release --property:PublishDir=/output/${TARGETARCH} ${SOLUTION_NAME}

FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy-chiseled

# Must be linux/amd64 or linux/arm64
ARG TARGETARCH

WORKDIR /app
COPY --from=builder ./output/ .
COPY --from=builder ./output/${TARGETARCH} .
ENTRYPOINT ["dotnet", "Dodo.DataMover.dll"]

0 comments on commit dd435f8

Please sign in to comment.