DAS_2024_1/balakhonov_danila_lab_3/ApiRestaurant/Dockerfile

15 lines
371 B
Docker
Raw Normal View History

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
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"]