-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmedia-download.Dockerfile
More file actions
28 lines (22 loc) · 1017 Bytes
/
media-download.Dockerfile
File metadata and controls
28 lines (22 loc) · 1017 Bytes
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
FROM python:3.12-bookworm
WORKDIR /opt
LABEL com.theguardian.transcription-service.media-download-container="Media download container with yt-dlp, associated dependencies and media download app"
ARG node_version
ARG BGUTIL_YTDLP_POT_PROVIDER_VERSION=1.3.0
RUN pip install --no-cache-dir -U "yt-dlp[default]"
RUN apt-get update
RUN apt-get install -y ffmpeg git nodejs npm
RUN npm install -g n yarn deno
RUN echo "node version: $node_version"
RUN n $node_version
# Setup bgutil-ytdlp-pot-provider provider
RUN git clone --single-branch --branch ${BGUTIL_YTDLP_POT_PROVIDER_VERSION} https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git
WORKDIR /opt/bgutil-ytdlp-pot-provider/server
RUN npm ci
RUN npx tsc
WORKDIR /opt
# Install the bgutil-ytdlp-pot-provider plugin for yt-dlp
RUN python -m pip install -U bgutil-ytdlp-pot-provider==${BGUTIL_YTDLP_POT_PROVIDER_VERSION}
# Install and run media-download app
COPY ./packages/media-download/dist/index.js /opt/media-download.js
CMD node /opt/media-download.js