This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
101 lines (94 loc) · 2.47 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
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 \
libxml2 \
optipng \
pngquant \
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/jonaswinkler/paperless-ng/releases" \
| jq -r '.[0] | .tag_name'); \
fi && \
curl -o \
/tmp/paperless.tar.gz -L \
"https://github.com/jonaswinkler/paperless-ng/releases/download/${PAPERLESS_RELEASE}/paperless-${PAPERLESS_RELEASE}.tar.xz" && \
tar xf \
/tmp/paperless.tar.gz -C \
/app/paperless/ --strip-components=1 && \
echo "**** install pip packages ****" && \
cd /app/paperless && \
pip3 install -U pip setuptools && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r 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