Skip to content

Commit 2be7266

Browse files
authored
feat: migrate to denoland/deno base image and integrate bgutil-ytdlp-pot-provider for YouTube POToken support (#7)
Integrate bgutil-ytdlp-pot-provider to enable YouTube POToken authentication, avoiding bot detection. This requires deno runtime, necessitating a base image change. ## Changes - **Base image**: `alpine:3` → `docker.io/denoland/deno:alpine` for deno runtime support - **yt-dlp version**: `2025.08.22` → `2025.12.08` - **POToken integration**: - Copy bgutil-pot server binary to `/usr/bin/` - Copy bgutil-ytdlp-pot-provider plugin to `/etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider` - Create plugin directory with proper permissions ## Verification Running `yt-dlp -v` in the built image confirms: - deno runtime available and used by yt-dlp - bgutil-pot found in PATH - POToken providers registered (bgutil:cli, bgutil:http) - Plugin directory correctly detected ``` [debug] JS runtimes: deno-2.6.0 [debug] [youtube] [pot:bgutil:cli] Found bgutil-pot in PATH [debug] [youtube] [pot] PO Token Providers: bgutil:cli-1.2.2 (external), bgutil:http-1.2.2 (external) ``` <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > Our `Dockerfile` currently uses `alpine:3` as the base image in the final stage. Your task is to change the final stage's base image to `docker.io/denoland/deno:alpine` and integrate both the client and server of `jim60105/bgutil-ytdlp-pot-provider-rs` into this Dockerfile. And also, change yt-dlp ARG to version 2025.12.08 > > To add bgutil-ytdlp-pot-provider-rs, use: > > ```Dockerfile > # Copy POToken server (bgutil-pot) > COPY --link --chown=$APP_UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/ > > # Copy POToken client plugin > COPY --link --chown=$APP_UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /client /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider > ``` > > How to verify: > > Run the built image temporarily with entrypoint="/usr/bin/yt-dlp" and cmd="-v IgYHzexgMJg". The output must indicate that it is using the bgutil POT provider bin and deno as the JS backend. If you see "deno not found" or it does not mention using bgutil POT provider bin, then this setup has failed and must be fixed. Note that these temporary changes to entrypoint and cmd are only for testing; do not include them in your Dockerfile. > > You cannot run LivestreamRecorderService because your development environment is not properly configured. Do not spend time trying to run LivestreamRecorderService program. </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/Recorder-moe/LivestreamRecorderService/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
2 parents 7856ec3 + 8c7f0e3 commit 2be7266

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG UID=1654
33
ARG VERSION=EDGE
44
ARG RELEASE=0
55
ARG BUILD_CONFIGURATION=ApacheCouchDB_Release
6-
ARG YTDLP_VERSION=2025.08.22
6+
ARG YTDLP_VERSION=2025.12.08
77

88
########################################
99
# Debug stage
@@ -53,7 +53,7 @@ RUN --mount=source=.,target=.,rw \
5353
########################################
5454
# Final stage
5555
########################################
56-
FROM alpine:3 AS final
56+
FROM docker.io/denoland/deno:alpine AS final
5757

5858
# RUN mount cache for multi-arch: https://github.com/docker/buildx/issues/549#issuecomment-1788297892
5959
ARG TARGETARCH
@@ -72,7 +72,8 @@ RUN --mount=type=cache,id=apk-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v
7272
# Create directories with correct permissions
7373
RUN install -d -m 775 -o $UID -g 0 /app && \
7474
install -d -m 775 -o $UID -g 0 /licenses && \
75-
install -d -m 775 -o $UID -g 0 /.cache
75+
install -d -m 775 -o $UID -g 0 /.cache && \
76+
install -d -m 775 -o $UID -g 0 /etc/yt-dlp-plugins
7677

7778
# Copy licenses (OpenShift Policy)
7879
COPY --link --chown=$UID:0 --chmod=775 LICENSE /licenses/LICENSE
@@ -85,6 +86,12 @@ COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /ffprobe /usr/bin/
8586
# dumb-init
8687
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:8.0 /dumb-init /usr/bin/
8788

89+
# Copy POToken server (bgutil-pot)
90+
COPY --link --chown=$APP_UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /bgutil-pot /usr/bin/
91+
92+
# Copy POToken client plugin
93+
COPY --link --chown=$APP_UID:0 --chmod=775 --from=ghcr.io/jim60105/bgutil-pot:latest /client /etc/yt-dlp-plugins/bgutil-ytdlp-pot-provider
94+
8895
# yt-dlp
8996
ARG YTDLP_VERSION
9097
ADD --link --chown=$UID:0 --chmod=775 https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp_linux /usr/bin/yt-dlp

0 commit comments

Comments
 (0)