Skip to content

Commit 47d6b1d

Browse files
committed
feat(Dockerfile): use conffile to specify js runtime for yt-dlp
Handle it gracefully. Signed-off-by: Tianling Shen <[email protected]>
1 parent 2b3016b commit 47d6b1d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ FROM node:lts-alpine
22

33
RUN set -ex && mkdir /app
44
RUN apk add --no-cache python3 youtube-dl \
5-
&& wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/.yt-dlp \
6-
&& chmod a+rx /usr/local/bin/.yt-dlp \
7-
&& printf '#!/bin/sh\nexec /usr/local/bin/.yt-dlp --js-runtimes node "$@"\n' | tee /usr/local/bin/yt-dlp \
8-
&& chmod a+rx /usr/local/bin/yt-dlp
5+
&& wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp \
6+
&& chmod a+rx /usr/local/bin/yt-dlp \
7+
&& printf '--cache-dir /var/cache/yt-dlp\n--js-runtimes node:/usr/local/bin/node\n' | tee /etc/yt-dlp.conf
98

109
COPY ./precompiled/* /app/
1110
COPY ./*.crt /app/

0 commit comments

Comments
 (0)