2024-11-03 19:18:40 +04:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
|
|
WORKDIR /App
|
|
|
|
|
|
|
|
# Copy everything
|
|
|
|
COPY . ./
|
|
|
|
# Restore as distinct layers
|
|
|
|
RUN dotnet restore
|
|
|
|
# Build and publish a release
|
|
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
|
2024-11-03 20:51:32 +04:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS app
|
|
|
|
ENV ASPNETCORE_URLS=http://*:5089
|
2024-11-03 19:18:40 +04:00
|
|
|
WORKDIR /App
|
|
|
|
COPY --from=build /App/out .
|
|
|
|
ENTRYPOINT ["dotnet", "ApiRestaurant.dll"]
|