# Build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Astrocore.Api/Astrocore.Api.csproj", "Astrocore.Api/"] RUN dotnet restore "./Astrocore.Api/Astrocore.Api.csproj" COPY . . WORKDIR /src/Astrocore.Api RUN dotnet publish "./Astrocore.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false # Runtime with ffmpeg already included FROM jrottenberg/ffmpeg:6.1-ubuntu2204 AS runtime-ffmpeg # .NET runtime FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final WORKDIR /app # Copy ffmpeg binaries into the final image COPY --from=runtime-ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg COPY --from=runtime-ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe COPY --from=build /app/publish . ARG APP_UID USER $APP_UID EXPOSE 8080 EXPOSE 8081 ENTRYPOINT ["dotnet", "Astrocore.Api.dll"]