This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
45 lines (33 loc) · 1.43 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 alpine:3.12.0
LABEL maintainer="Chris Kankiewicz <[email protected]>"
# Define Flexget version
ARG FLEXGET_VERSION=3.1.80
# Create Flexget directories
RUN mkdir -pv /opt/flexget /etc/flexget
# Copy entrypoint script into image
COPY files/entrypoint.sh /opt/flexget/entrypoint.sh
# Create non-root user
RUN adduser -DHs /sbin/nologin flexget
# Set Flexget archive URL
ARG TARBALL_URL=https://api.github.com/repos/flexget/flexget/tarball/v${FLEXGET_VERSION}
# Download and extract Flexget archive and chown files
RUN apk add --update ca-certificates python3-dev tzdata \
&& apk add --update --virtual extraction-deps tar wget \
&& wget -qO- ${TARBALL_URL} | tar -xz --strip-components=1 -C /opt/flexget \
&& apk del --purge extraction-deps && rm -rf /var/cache/apk/* \
&& chown -R flexget:flexget /etc/flexget /opt/flexget
# Install dependencies
RUN apk add --update --virtual build-dependencies jpeg-dev gcc musl-dev py-pip zlib-dev \
&& pip install --no-cache-dir paver transmissionrpc \
&& pip install --no-cache-dir --ignore-installed six -e /opt/flexget \
&& apk del --purge build-dependencies && rm -rf /var/cache/apk/*
# Set running user
USER flexget
# Define volumes
VOLUME /etc/flexget
# Set working directory
WORKDIR /opt/flexget
# Default entrypoint
ENTRYPOINT ["/opt/flexget/entrypoint.sh"]
# Default command
CMD ["flexget", "-c", "/etc/flexget/config.yml", "--loglevel", "verbose", "daemon", "start"]