diff --git a/Server/.dockerignore b/Server/.dockerignore index e5c60aba..bf86e057 100644 --- a/Server/.dockerignore +++ b/Server/.dockerignore @@ -28,5 +28,7 @@ **/obj **/secrets.dev.yaml **/values.dev.yaml +**/coverage.json +**/TestResults LICENSE README.md diff --git a/Server/server.Dockerfile b/Server/server.Dockerfile index a22d5148..cb842003 100644 --- a/Server/server.Dockerfile +++ b/Server/server.Dockerfile @@ -1,13 +1,13 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build -COPY . /source -WORKDIR /source/ReasnAPI/ReasnAPI +COPY ReasnAPI /source +WORKDIR /source/ReasnAPI ARG TARGETARCH RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS development -COPY . /source -WORKDIR /source/ReasnAPI/ReasnAPI +COPY ReasnAPI /source +WORKDIR /source/ReasnAPI CMD ["dotnet", "run", "--no-launch-profile"] FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS production