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.armhf
119 lines (112 loc) · 2.91 KB
/
Dockerfile.armhf
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-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 \
cargo \
gfortran \
git \
jq \
libatlas-base-dev \
libffi-dev \
libfreetype6-dev \
libjpeg-dev \
libleptonica-dev \
libpq-dev \
libqpdf-dev \
libssl-dev \
libtool \
python3-dev \
python3-pip \
rustc \
zlib1g-dev"
ARG RUNTIME_PACKAGES="\
curl \
gettext \
ghostscript \
gnupg \
gunicorn \
icc-profiles-free \
imagemagick \
liblept5 \
libmagic-dev \
libpoppler-cpp-dev \
libpq5 \
libxml2 \
libxslt1.1 \
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 "**** add libqpdf ****" && \
LIBQPDFURL=$(curl -sL https://wheel-index.linuxserver.io/ubuntu/ | grep "focal-arm32v7.tar" | sed "s|.*'\(.*\)'.*|\1|") && \
curl -o \
/tmp/libqpdf.tar -L \
"${LIBQPDFURL}" && \
tar xvPf \
/tmp/libqpdf.tar && \
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