# syntax=docker/dockerfile:1 FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /source COPY src/GuessTheSong.Shared/GuessTheSong.Shared.csproj src/GuessTheSong.Shared/ COPY src/GuessTheSong.Client/GuessTheSong.Client.csproj src/GuessTheSong.Client/ RUN dotnet restore src/GuessTheSong.Client/GuessTheSong.Client.csproj COPY src/GuessTheSong.Shared/ src/GuessTheSong.Shared/ COPY src/GuessTheSong.Client/ src/GuessTheSong.Client/ RUN dotnet publish src/GuessTheSong.Client/GuessTheSong.Client.csproj \ --configuration Release \ --output /artifacts/client \ --no-restore FROM nginxinc/nginx-unprivileged:alpine AS final COPY nginx.guess-the-song.conf /etc/nginx/conf.d/default.conf COPY --from=build /artifacts/client/wwwroot/ /usr/share/nginx/html/ EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ CMD wget --quiet --tries=1 --spider http://127.0.0.1:8080/health || exit 1