distributed-computing/tasks/fomichev-ai/lab_2/worker-1/Dockerfile

17 lines
687 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Задаем базовый образ на .NET 7.0.
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
# Задаем рабочую директорию.
WORKDIR /src
# В каталог копируем файлы и папки в контейнер.
COPY . ./
# Создаем образы и устанавливаем данные пакеты в контейнер.
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /publish
FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime
WORKDIR /publish
COPY --from=build-env /publish .
# Вызываем приложение во время выполнения контейнера.
ENTRYPOINT ["dotnet", "worker-1.dll"]