This repository was archived by the owner on Feb 15, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile.aarch64
80 lines (73 loc) · 1.91 KB
/
Dockerfile.aarch64
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
FROM lsiobase/ubuntu:arm64v8-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 BUILD_PACKAGES="\
apache2-dev \
build-essential \
git \
libffi-dev \
libpq-dev \
libmariadbclient-dev \
libxml2-dev \
libxslt-dev \
locales \
python3-dev \
python3-pip"
# packages as variables
ARG RUNTIME_PACKAGES="\
imagemagick \
libxslt1.1 \
pdftk-java \
poppler-utils \
python3 \
python3-cryptography \
python3-distutils \
python3-setuptools \
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 && \
/bin/bash -c 'shopt -s globstar && \
for f in ./requirements/**/*; do pip3 install -r $f; done && \
shopt -u globstar' && \
echo "**** cleanup ****" && \
apt-get purge -y --auto-remove \
$BUILD_PACKAGES && \
rm -rf \
/root/.cache \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 8000