forked from mylar3/mylar3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (34 loc) · 1.25 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
ARG BASE_VERSION=3.8.2-alpine3.11
FROM python:${BASE_VERSION}
# set version label
ARG MYLAR_COMMIT=v0.3.0
ARG ORG=mylar3
LABEL version ${BASE_VERSION}_${MYLAR_COMMIT}
RUN \
echo "**** install system packages ****" && \
apk add --no-cache \
git=2.24.3-r0 \
# cfscrape dependecies
nodejs=12.15.0-r1 \
# unrar-cffi & Pillow dependencies
build-base=0.5-r1 \
# unar-cffi dependencies
libffi-dev=3.2.1-r6 \
# Pillow dependencies
zlib-dev=1.2.11-r3 \
jpeg-dev=8-r6
# It might be better to check out release tags than python3-dev HEAD.
# For development work I reccomend mounting a full git repo from the
# docker host over /app/mylar.
RUN echo "**** install app ****" && \
git config --global advice.detachedHead false && \
git clone https://github.com/${ORG}/mylar3.git --depth 1 --branch ${MYLAR_COMMIT} --single-branch /app/mylar
RUN echo "**** install requirements ****" && \
pip3 install --no-cache-dir -U -r /app/mylar/requirements.txt && \
rm -rf ~/.cache/pip/*
# TODO image could be further slimmed by moving python wheel building into a
# build image and copying the results to the final image.
# ports and volumes
VOLUME /config /comics /downloads
EXPOSE 8090
CMD ["python3", "/app/mylar/Mylar.py", "--nolaunch", "--quiet", "--datadir", "/config/mylar"]