forked from linuxserver-archive/docker-papermerge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.armhf
88 lines (81 loc) · 2.62 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
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PAPERMERGE_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="alex-phillips"
# ensures our console output looks familiar and is not buffered by Docker
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE config.settings.production
ARG DEBIAN_FRONTEND="noninteractive"
# NOTE: the additional lib and python dependencies are for the ARM builds
ARG BUILD_PACKAGES="\
apache2-dev \
build-essential \
git \
libffi-dev \
libpq-dev \
libmariadbclient-dev \
libxml2-dev \
libxslt-dev \
python3-dev \
python3-pip"
# packages as variables
ARG RUNTIME_PACKAGES="\
imagemagick \
libmariadb3 \
libpq5 \
libxslt1.1 \
poppler-utils \
python3 \
python3-cryptography \
python3-distutils \
python3-mysqldb \
python3-psycopg2 \
python3-setuptools \
redis \
tesseract-ocr \
tesseract-ocr-eng \
uwsgi \
uwsgi-plugin-python3"
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 papermerge ****" && \
mkdir -p /app/papermerge && \
if [ -z ${PAPERMERGE_RELEASE+x} ]; then \
PAPERMERGE_RELEASE=$(curl -sX GET "https://api.github.com/repos/ciur/papermerge/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/papermerge.tar.gz -L \
"https://github.com/ciur/papermerge/archive/${PAPERMERGE_RELEASE}.tar.gz" && \
tar xf \
/tmp/papermerge.tar.gz -C \
/app/papermerge/ --strip-components=1 && \
echo "**** install pip packages ****" && \
cd /app/papermerge && \
pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ django==3.1.7 && \
pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r ./requirements/base.txt && \
pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r ./requirements/production.txt && \
pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r ./requirements/extra/mysql.txt && \
pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r ./requirements/extra/pg.txt && \
echo "**** cleanup ****" && \
apt-get purge -y --auto-remove \
$BUILD_PACKAGES && \
rm -rf \
/root/.cache \
/tmp/* && \
apt-get clean -y
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 8000