forked from bdwinanto/sonarr_yt-dlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (29 loc) · 899 Bytes
/
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
FROM python:alpine AS base
RUN apk update && \
apk add --no-cache ffmpeg
FROM python:alpine AS dependencies
COPY requirements.txt ./
RUN apk update && \
apk add --no-cache build-base && \
pip install --upgrade pip && pip install -r requirements.txt
FROM base
ARG UID=1000 GID=1000 UNAME=abc
RUN adduser -D $UNAME
WORKDIR /home/$UNAME
COPY . /home/$UNAME
COPY --from=dependencies /root/.cache /root/.cache
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt && rm -rf /root/.cache
RUN mkdir /config /sonarr_root /logs && \
touch /var/lock/sonarr_youtube.lock
COPY app/ /app
RUN \
chmod a+x \
/app/sonarr_youtubedl.py \
/app/utils.py \
/app/config.yml.template
COPY --chown=$UID:$GID . .
USER $UNAME
VOLUME /config /sonarr_root /logs
ENV CONFIGPATH /config/config.yml
CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ]