From ae5a32afaa0d8f0c453a38953a9b1e3ee7e82e57 Mon Sep 17 00:00:00 2001 From: Ricardo Carneiro <71648276+ricarneiro@users.noreply.github.com> Date: Tue, 27 May 2025 09:54:09 -0300 Subject: [PATCH] fix: novo dockerfile --- YTExtractor/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/YTExtractor/Dockerfile b/YTExtractor/Dockerfile index e7c97b7..753c93b 100644 --- a/YTExtractor/Dockerfile +++ b/YTExtractor/Dockerfile @@ -1,19 +1,22 @@ +# Build stage FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY . . RUN dotnet restore RUN dotnet publish -c Release -o /app +# Runtime stage FROM mcr.microsoft.com/dotnet/aspnet:8.0 WORKDIR /app COPY --from=build /app . +# Install yt-dlp with --break-system-packages flag (necessário no Debian 12) RUN apt-get update && \ apt-get install -y python3-pip && \ - pip3 install yt-dlp && \ + pip3 install --break-system-packages yt-dlp && \ mkdir /app/temp && \ chmod 777 /app/temp && \ which yt-dlp || (echo "yt-dlp not found" && exit 1) EXPOSE 80 -ENTRYPOINT ["dotnet", "YTExtractor.dll"] +ENTRYPOINT ["dotnet", "YTExtractor.dll"] \ No newline at end of file