ytdlp / Dockerfile
axebps's picture
Create Dockerfile
cc72b7a verified
FROM ubuntu:24.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends tzdata wget ca-certificates proxychains4 xz-utils python3 python3-pip && \
sed -i 's/^socks.*/socks5 127.0.0.1 1080/' /etc/proxychains4.conf && \
wget -O wireproxy.tar.gz "https://github.com/pufferffish/wireproxy/releases/download/v1.0.9/wireproxy_linux_amd64.tar.gz" && \
tar -zxf wireproxy.tar.gz && \
mv wireproxy /usr/local/bin/ && \
rm wireproxy.tar.gz && \
wget -O ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2025-01-31-12-58/ffmpeg-N-118385-g0225fe857d-linux64-gpl.tar.xz" && \
tar -xf ffmpeg.tar.xz && \
mv ffmpeg-N-118385-g0225fe857d-linux64-gpl/bin/ffmpeg /usr/local/bin/ && \
rm -r ffmpeg* && \
userdel -r ubuntu && \
useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
RUN pip3 install --no-cache-dir flask --break-system-packages && \
wget -P /home/user/.local/bin/ "https://github.com/yt-dlp/yt-dlp/releases/download/2025.01.26/yt-dlp" && \
chmod +x /home/user/.local/bin/yt-dlp && \
chmod +x /home/user/app/entrypoint.sh
CMD ["/home/user/app/entrypoint.sh"]