updated the build process, it now works on RPi as well.

This commit is contained in:
Jonas Winkler
2020-11-18 22:43:36 +01:00
parent d8e6804650
commit 0bc6d471fa
6 changed files with 83 additions and 106 deletions

View File

@@ -2,27 +2,25 @@
### Back end ###
###############################################################################
FROM ubuntu:20.04
FROM python:3.7-slim
WORKDIR /usr/src/paperless/
COPY Pipfile* ./
COPY requirements.txt ./
#Dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get -y --no-install-recommends install \
&& apt-get -y --no-install-recommends install \
build-essential \
curl \
ghostscript \
gnupg \
imagemagick \
libatlas-base-dev \
libmagic-dev \
libpoppler-cpp-dev \
libpq-dev \
optipng \
python3 \
python3-dev \
python3-pip \
sudo \
tesseract-ocr \
tesseract-ocr-eng \
@@ -32,10 +30,9 @@ RUN apt-get update \
tesseract-ocr-spa \
tzdata \
unpaper \
&& pip3 install --upgrade pipenv supervisor setuptools \
&& pipenv install --system --deploy \
&& pipenv --clear \
&& apt-get -y purge build-essential python3-pip python3-dev \
&& pip3 install --upgrade supervisor setuptools \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get -y purge build-essential \
&& apt-get -y autoremove --purge \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /var/log/supervisord /var/run/supervisord