Reorganize .docker folder so we don't have to rebuild as much

This commit is contained in:
James R. Barlow
2019-05-28 14:18:54 -07:00
parent 9d5f23e961
commit 396c39978a
6 changed files with 3 additions and 49 deletions
+2 -2
View File
@@ -75,12 +75,12 @@ RUN \
WORKDIR /app
# Copy build artifacts (python site-packages9
# Copy build artifacts (python site-packages)
COPY --from=builder /usr/lib/python3.6/site-packages /usr/lib/python3.6/site-packages
COPY --from=builder /usr/bin/ocrmypdf /usr/bin/dumppdf.py /usr/bin/latin2ascii.py /usr/bin/pdf2txt.py /usr/bin/img2pdf /usr/bin/chardetect /usr/bin/
# Copy
COPY --from=builder /app/.docker/webservice.py /app/
COPY --from=builder /app/misc/webservice.py /app/
# Copy minimal project files to get the test suite.
COPY --from=builder /app/setup.cfg /app/setup.py /app/README.md /app/
-5
View File
@@ -1,5 +0,0 @@
#!/bin/bash
. /appenv/bin/activate
cd /home/docker
exec ocrmypdf "$@"
-17
View File
@@ -1,17 +0,0 @@
# OCRmyPDF polyglot
#
FROM jbarlow83/ocrmypdf:latest
USER root
# Update system and install our dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr-all
RUN apt-get autoremove -y && apt-get clean -y
USER docker
# Must use array form of ENTRYPOINT
# Non-array form does not append other arguments, because that is "intuitive"
ENTRYPOINT ["/application/.docker/docker-wrapper.sh"]
-24
View File
@@ -1,24 +0,0 @@
# OCRmyPDF webservice
#
FROM jbarlow83/ocrmypdf-polyglot:latest
USER root
# Update system and install our dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-flask
RUN apt-get autoremove -y && apt-get clean -y
EXPOSE 5000
COPY .docker/webservice.py /application
USER docker
VOLUME ["/config"]
# This config file is optional
ENV OCRMYPDF_WEBSERVICE_SETTINGS "/config/config.py"
ENTRYPOINT ["python3", "/application/webservice.py"]
+1 -1
View File
@@ -6,7 +6,6 @@
**/*.pyc
.*/
!.git/
!.docker/
.ruffus_history.sqlite
bin/
build/
@@ -17,6 +16,7 @@ include/
lib/
MANIFEST.in
ocrmypdf.egg-info/
private/
staging/
tests/cache/
tests/output/