forked from whatdaybob/sonarr_youtubedl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (34 loc) · 910 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
42
43
44
45
FROM python:alpine
LABEL maintainer="Martin Jones <whatdaybob@outlook.com>"
ARG UID=1000
ARG GID=1000
ARG UNAME=abc
# Update and install ffmpeg
RUN apk update && \
apk add --no-cache ffmpeg alpine-sdk
RUN mkdir /config /app /sonarr_root /logs && \
touch /var/lock/sonarr_youtube.lock
# add local files
COPY app/ /app
# update file permissions
RUN \
chmod a+x \
/app/sonarr_youtubedl.py \
/app/utils.py \
/app/config.yml.template
RUN pip install --upgrade pip
RUN adduser -D $UNAME
USER $UNAME
WORKDIR /home/$UNAME
# Copy and install requirements
COPY --chown=$UID:$GID requirements.txt requirements.txt
RUN pip install --user -r requirements.txt
ENV PATH="/home/$UNAME/.local/bin:${PATH}"
COPY --chown=$UID:$GID . .
# add volumes
VOLUME /config
VOLUME /sonarr_root
VOLUME /logs
# ENV setup
ENV CONFIGPATH /config/config.yml
CMD [ "python", "-u", "/app/sonarr_youtubedl.py" ]