-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (37 loc) · 1.28 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
37
38
39
40
41
42
43
44
45
FROM python:3-alpine
RUN echo "**** install runtime packages ****" \
&& apk add --update --no-cache --virtual .build-deps \
gcc musl-dev \
&& apk add --no-cache \
bash bash-completion \
ca-certificates coreutils curl jq procps shadow tzdata \
su-exec \
ffmpeg \
&& apk del .build-deps
RUN echo "**** install application packages ****" \
&& pip install --upgrade pip setuptools wheel \
&& pip install certifi brotli websockets mutagen pycryptodome xattr \
&& pip install yt-dlp \
&& pip install gallery-dl \
&& rm -rf ~/.cache/pip
ENV PUID=911
ENV PGID=911
ENV UMASK=000
RUN echo "**** create abc user and make our folders ****" && \
umask ${UMASK} && \
useradd -u ${PUID} -U -d /config abc && \
usermod -G users abc && \
mkdir -p \
/config \
/output
COPY includes/gallery-dl-default.conf /etc/gallery-dl.conf
COPY includes/yt-dlp-default.conf /etc/yt-dlp.conf
COPY includes/docker-entrypoint.sh /etc/docker-entrypoint.sh
RUN echo "**** prepare entrypoint ****" && \
chmod +x /etc/docker-entrypoint.sh && \
echo 'exec /etc/docker-entrypoint.sh' >> ~/.bashrc && \
echo "Any root access of bash pushes into user abc. Use sh for root access"
ENTRYPOINT [ "/etc/docker-entrypoint.sh" ]
CMD [ "/bin/bash" ]
WORKDIR /output
VOLUME ["/config", "/output"]