Skip to content

Commit

Permalink
Docker: ignore sub-submodules (assets etc)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Feb 22, 2024
1 parent 6a75a34 commit 3aeac69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ocrd-all-module-dir.json
opencv-python
# only needed for testing:
# (but we may want that, only 169 MB)
# **/assets/*
**/assets/*
# recursive submodules, too deep
ocrd_tesserocr/repo/tesseract/test/*
ocrd_tesserocr/repo/tesseract/unittest/third_party/googletest/*
# avoid interference with host-local builds:
**/build/*
*/.eggs/*
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ RUN echo "make $PARALLEL all" >> docker.sh
# remove unneeded automatic deps and clear pkg cache
RUN echo "apt-get -y remove automake autoconf libtool pkg-config g++ && apt-get -y clean" >> docker.sh
# clean-up some temporary files (git repos are also installation targets and must be kept)
RUN echo "make -i clean-olena clean-tesseract; rm -fr /.cache" >> docker.sh
RUN echo "make -i clean-tesseract" >> docker.sh
RUN echo "make -i clean-olena" >> docker.sh
RUN echo "rm -fr /.cache" >> docker.sh
# run the script in one layer/step (to minimise image size)
# (and export all variables)
RUN set -a; bash docker.sh
Expand Down

0 comments on commit 3aeac69

Please sign in to comment.