From 771c8bbbe4e8acaf81617c408293606535fd3840 Mon Sep 17 00:00:00 2001 From: Guy Addadi Date: Mon, 11 Dec 2017 00:41:36 +0200 Subject: [PATCH] added bash and moved all dev packages to be with virtual alpine env that is removed after python libraries installation --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20206a5ba..7b0464a21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,10 @@ FROM alpine:latest # Install dependencies RUN apk --no-cache --update add \ - python3 python3-dev gcc musl-dev gnupg zlib-dev jpeg-dev libmagic \ - sudo tesseract-ocr imagemagick ghostscript unpaper + python3 gnupg libmagic bash \ + sudo tesseract-ocr imagemagick ghostscript unpaper && \ + apk --no-cache add --virtual .build-dependencies \ + python3-dev gcc musl-dev zlib-dev jpeg-dev ## Install python dependencies RUN python3 -m ensurepip && \ @@ -46,4 +48,7 @@ RUN chmod 755 /sbin/docker-entrypoint.sh VOLUME ["/usr/src/paperless/data", "/usr/src/paperless/media", "/consume", "/export"] ENTRYPOINT ["/sbin/docker-entrypoint.sh"] + +# Remove build dependencies +RUN apk del .build-dependencies CMD ["--help"]