This repository has been archived by the owner on Sep 23, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
104 lines (97 loc) · 2.54 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PAPERLESS_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="alex-phillips"
ENV PAPERLESS_DATA_DIR=/config
ENV PAPERLESS_MEDIA_ROOT=/data/media
ENV PAPERLESS_CONSUMPTION_DIR=/data/consume
ARG BUILD_PACKAGES="\
automake \
autotools-dev \
build-essential \
git \
jq \
libatlas-base-dev \
libleptonica-dev \
libpq-dev \
libqpdf-dev \
libtool \
python3-dev \
python3-pip \
zlib1g-dev"
ARG RUNTIME_PACKAGES="\
curl \
gettext \
ghostscript \
gnupg \
gunicorn \
icc-profiles-free \
imagemagick \
liblept5 \
libmagic-dev \
libpoppler-cpp-dev \
libpq5 \
libxml2 \
libzbar0 \
optipng \
pngquant \
poppler-utils \
python3 \
python3-setuptools \
qpdf \
redis \
tesseract-ocr \
tesseract-ocr-eng \
tzdata \
unpaper \
zlib1g"
RUN \
apt-get update && \
echo "**** install build packages ****" && \
apt-get install -y \
--no-install-recommends \
$BUILD_PACKAGES && \
echo "**** install runtime packages ****" && \
apt-get install -y \
--no-install-recommends \
$RUNTIME_PACKAGES && \
echo "**** install jbig2enc ****" && \
git clone https://github.com/agl/jbig2enc /tmp/jbig2enc && \
cd /tmp/jbig2enc && \
./autogen.sh && \
./configure && \
make && \
cp /tmp/jbig2enc/src/.libs/libjbig2enc* /usr/local/lib/ && \
cp /tmp/jbig2enc/src/jbig2 /usr/local/bin/ && \
cp /tmp/jbig2enc/src/*.h /usr/local/include/ && \
echo "**** install paperless ****" && \
mkdir -p /app/paperless && \
if [ -z ${PAPERLESS_RELEASE+x} ]; then \
PAPERLESS_RELEASE=$(curl -sX GET "https://api.github.com/repos/paperless-ngx/paperless-ngx/releases" \
| jq -r '.[0] | .tag_name'); \
fi && \
curl -o \
/tmp/paperless.tar.gz -L \
"https://github.com/paperless-ngx/paperless-ngx/releases/download/${PAPERLESS_RELEASE}/paperless-ngx-${PAPERLESS_RELEASE}.tar.xz" && \
tar xf \
/tmp/paperless.tar.gz -C \
/app/paperless/ --strip-components=1 && \
echo "**** install pip packages ****" && \
cd / && \
pip3 install -U pip setuptools==60.10.0 wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r /app/paperless/requirements.txt && \
echo "**** cleanup ****" && \
apt-get purge -y --auto-remove \
$BUILD_PACKAGES && \
rm -rf \
/root/.cache \
/root/.cargo \
/tmp/* && \
apt-get clean -y
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 8000