19 lines
596 B
Docker

FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["PlayerRegistration/PlayerRegistration.fsproj", "PlayerRegistration/"]
RUN dotnet restore "PlayerRegistration/PlayerRegistration.fsproj"
COPY . .
WORKDIR "/src/PlayerRegistration"
RUN dotnet build "PlayerRegistration.fsproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "PlayerRegistration.fsproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "PlayerRegistration.dll"]