FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
RUN apt install git
RUN git clone https://gitlab.tesses.net/tesses50/ytapic.git .
RUN dotnet restore "./ytapic.csproj" --disable-parallel
RUN dotnet publish "./ytapic.csproj" -c Release -o /app --no-restore

#serve stage
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
COPY --from=build /app ./

EXPOSE 80

ENTRYPOINT ["dotnet","ytapic.dll"]
