diff options
Diffstat (limited to 'code/api/Dockerfile')
| -rw-r--r-- | code/api/Dockerfile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/code/api/Dockerfile b/code/api/Dockerfile new file mode 100644 index 0000000..5a5545f --- /dev/null +++ b/code/api/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/dotnet/sdk:7.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:7.0 +WORKDIR /app +COPY --from=build-env /source/out . +ENTRYPOINT ["dotnet", "IOL.GreatOffice.Api.dll"] |
