forked from nbr23/youtube-dl-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 1.07 KB
/
Dockerfile
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
#
# twl-dl-server Server Dockerfile
#
# https://github.com/ToWatchList/twl-dl-server
#
FROM python:alpine
ARG YOUTUBE_DL=yt_dlp
ENV YOUTUBE_DL=$YOUTUBE_DL
RUN apk add --no-cache ffmpeg tzdata curl wget gcc musl-dev
WORKDIR /usr/src/app
COPY ./requirements.txt ./youtube-dl-server.py ./
RUN python -m pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
COPY ./ydl_server /usr/src/app/ydl_server
WORKDIR /usr/src/app/ydl_server/static
# Download static files (JS/CSS Libraries)
RUN curl -s https://code.jquery.com/jquery-3.4.1.min.js > js/jquery.min.js && \
curl -s https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js > js/popper.min.js && \
wget -q https://github.com/twbs/bootstrap/releases/download/v4.4.1/bootstrap-4.4.1-dist.zip && \
mkdir tmp_bs && \
unzip bootstrap-4.4.1-dist.zip -d tmp_bs && \
mv tmp_bs/*/css/* css/ && \
mv tmp_bs/*/js/* js/ && \
rm -rf bootstrap-4.4.1-dist.zip tmp_bs && \
apk del curl wget
WORKDIR /usr/src/app
EXPOSE 8080
VOLUME ["/youtube-dl"]
CMD [ "python", "-u", "./youtube-dl-server.py" ]