diff options
Diffstat (limited to 'server/Dockerfile')
| -rw-r--r-- | server/Dockerfile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..adc4be3 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env +WORKDIR /source + +# Copy csproj and restore as distinct layers +COPY src/*.csproj ./ +RUN dotnet restore + +# Copy everything else and build +COPY src/ ./ +RUN dotnet publish -c Release -o out + +# Build runtime image +FROM mcr.microsoft.com/dotnet/aspnet:6.0 +WORKDIR /app +COPY --from=build-env /source/out . +ENTRYPOINT ["dotnet", "IOL.GreatOffice.Api.dll"] |
