fix: novo dockerfile
This commit is contained in:
parent
7b3aba06ac
commit
ae5a32afaa
@ -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"]
|
||||
Loading…
Reference in New Issue
Block a user