new-infofer-scraper/Dockerfile

25 lines
656 B
Text
Raw Normal View History

# https://hub.docker.com/_/microsoft-dotnet
2024-09-01 03:49:45 +02:00
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /source
# copy csproj and restore as distinct layers
COPY *.sln .
COPY server/*.csproj ./server/
COPY scraper/*.csproj ./scraper/
COPY ConsoleTest/*.csproj ./ConsoleTest/
RUN dotnet restore
# copy everything else and build app
COPY server/. ./server/
COPY scraper/. ./scraper/
COPY ConsoleTest/. ./ConsoleTest/
WORKDIR /source/server
2024-09-01 03:49:45 +02:00
RUN dotnet publish -f net8.0 -c release -o /app --no-restore
# final stage/image
2024-09-01 03:49:45 +02:00
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app ./
2022-08-03 01:03:18 +03:00
ENV INSIDE_DOCKER=true
ENTRYPOINT ["dotnet", "Server.dll"]