FROM microsoft/dotnet:2.2-sdk-alpine AS builder
WORKDIR /app

COPY ./Stratis.Guru ./

RUN dotnet build

RUN dotnet publish -c Release --framework netcoreapp2.2 --runtime alpine-x64 -o out

FROM microsoft/dotnet:2.2-runtime-alpine
WORKDIR /app
COPY --from=builder /app/out .
COPY ./appsettings.json .

RUN mkdir -p /app/Documentation/site

ENTRYPOINT ["dotnet", "Stratis.Guru.dll"]