-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.api
More file actions
22 lines (18 loc) · 747 Bytes
/
Copy pathDockerfile.api
File metadata and controls
22 lines (18 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY global.json ./
COPY Kitchen.Shared/Kitchen.Shared.csproj Kitchen.Shared/
COPY Kitchen.ServiceDefaults/Kitchen.ServiceDefaults.csproj Kitchen.ServiceDefaults/
COPY Kitchen.Api/Kitchen.Api.csproj Kitchen.Api/
RUN dotnet restore Kitchen.Api/Kitchen.Api.csproj
COPY Kitchen.Shared/ Kitchen.Shared/
COPY Kitchen.ServiceDefaults/ Kitchen.ServiceDefaults/
COPY Kitchen.Api/ Kitchen.Api/
RUN dotnet publish Kitchen.Api/Kitchen.Api.csproj \
-c Release \
--no-restore \
-o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Kitchen.Api.dll"]