FROM python:3.7-slim-stretch RUN apt-get update && apt-get install -y gcc ghostscript pdftohtml imagemagick parallel python3-dev python3-pip libxml2-dev libxslt1-dev zlib1g-dev g++ COPY requirements.txt . RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt --upgrade COPY app app/ RUN python app/server.py EXPOSE 5042 CMD ["python", "app/server.py", "serve"]