forked from jim60105/docker-yt-dlp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpot.Dockerfile
More file actions
81 lines (63 loc) · 2.87 KB
/
pot.Dockerfile
File metadata and controls
81 lines (63 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# syntax=docker/dockerfile:1
ARG UID=1001
ARG VERSION=2025.12.08
ARG RELEASE=0
ARG NIGHTLY=
########################################
# folder stage
########################################
FROM alpine:3 AS folder
# Create directories with correct permissions
ARG UID
RUN install -d -m 775 -o $UID -g 0 /newdir
########################################
# Final stage
########################################
FROM docker.io/denoland/deno:alpine AS final
ARG UID
# Create directories with correct permissions
COPY --chown=$UID:0 --chmod=775 --from=folder /newdir /licenses
COPY --chown=$UID:0 --chmod=775 --from=folder /newdir /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
COPY --link --chown=$UID:0 --chmod=775 --from=folder /newdir /download
COPY --link --chown=$UID:0 --chmod=775 --from=folder /newdir /tmp
COPY --link --chown=$UID:0 --chmod=775 --from=folder /newdir /.cache
# Copy licenses (OpenShift Policy)
COPY --link --chown=$UID:0 --chmod=775 LICENSE /licenses/Dockerfile.LICENSE
COPY --link --chown=$UID:0 --chmod=775 yt-dlp/LICENSE /licenses/yt-dlp.LICENSE
# ffmpeg
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffmpeg /usr/bin/
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffprobe /usr/bin/
# dumb-init
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /dumb-init /usr/bin/
# BgUtil POT provider
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/
# BgUtil POT client
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /client /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
# Ensure the cache is not reused when installing yt-dlp
ARG RELEASE
ARG VERSION
ARG NIGHTLY
# yt-dlp
ADD --link --chown=$UID:0 --chmod=775 https://github.com/yt-dlp/yt-dlp${NIGHTLY:+-nightly-builds}/releases/download/${VERSION}/yt-dlp_musllinux /usr/bin/yt-dlp
WORKDIR /download
VOLUME [ "/download" ]
USER $UID
STOPSIGNAL SIGINT
# Use dumb-init as PID 1 to handle signals properly
ENTRYPOINT [ "dumb-init", "--", "yt-dlp", "--no-cache-dir" ]
CMD ["--help"]
ARG VERSION
ARG RELEASE
LABEL name="jim60105/docker-yt-dlp" \
# Authors for yt-dlp
vendor="yt-dlp" \
# Maintainer for this docker image
maintainer="jim60105" \
# Dockerfile source repository
url="https://github.com/jim60105/docker-yt-dlp" \
version=${VERSION} \
# This should be a number, incremented with each change
release=${RELEASE} \
io.k8s.display-name="yt-dlp" \
summary="yt-dlp: A feature-rich command-line audio/video downloader." \
description="yt-dlp is a feature-rich command-line audio/video downloader with support for thousands of sites. The project is a fork of youtube-dl based on the now inactive youtube-dlc. For more information about this tool, please visit the following website: https://github.com/yt-dlp/yt-dlp"