|
1 |
| -FROM ocrd/core:v2.67.2 AS base |
| 1 | +ARG DOCKER_BASE_IMAGE |
| 2 | +FROM $DOCKER_BASE_IMAGE AS base |
2 | 3 | ARG VCS_REF
|
3 | 4 | ARG BUILD_DATE
|
4 | 5 | LABEL \
|
5 |
| - maintainer="https://github.com/OCR-D/ocrd_cis/issues" \ |
| 6 | + maintainer="https://github.com/cisocrgroup/ocrd_cis/issues" \ |
6 | 7 | org.label-schema.vcs-ref=$VCS_REF \
|
7 |
| - org.label-schema.vcs-url="https://github.com/OCR-D/ocrd_cis" \ |
8 |
| - org.label-schema.build-date=$BUILD_DATE |
| 8 | + org.label-schema.vcs-url="https://github.com/cisocrgroup/ocrd_cis" \ |
| 9 | + org.label-schema.build-date=$BUILD_DATE \ |
| 10 | + org.opencontainers.image.vendor="DFG-Funded Initiative for Optical Character Recognition Development" \ |
| 11 | + org.opencontainers.image.title="ocrd_cis" \ |
| 12 | + org.opencontainers.image.description="Ocropy OCR and CIS post-correction bindings" \ |
| 13 | + org.opencontainers.image.source="https://github.com/cisocrgroup/ocrd_cis" \ |
| 14 | + org.opencontainers.image.documentation="https://github.com/cisocrgroup/ocrd_cis/blob/${VCS_REF}/README.md" \ |
| 15 | + org.opencontainers.image.revision=$VCS_REF \ |
| 16 | + org.opencontainers.image.created=$BUILD_DATE \ |
| 17 | + org.opencontainers.image.base.name=ocrd/core |
9 | 18 |
|
10 | 19 | ENV GITURL="https://github.com/cisocrgroup"
|
11 |
| -ENV DOWNLOAD_URL="http://cis.lmu.de/~finkf" |
12 | 20 |
|
13 | 21 | SHELL ["/bin/bash", "-c"]
|
14 | 22 |
|
@@ -51,19 +59,23 @@ RUN apt-get update \
|
51 | 59 |
|
52 | 60 | FROM base AS postcorrection
|
53 | 61 | # install ocrd_cis (python)
|
54 |
| -VOLUME ["/data"] |
| 62 | +WORKDIR /build/ocrd_cis |
55 | 63 | COPY --from=languagemodel /etc/profiler/languages /etc/profiler/languages
|
56 | 64 | COPY --from=profiler /apps/profiler /apps/
|
57 | 65 | COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib//x86_64-linux-gnu/
|
58 | 66 | COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib//x86_64-linux-gnu/
|
59 | 67 | COPY --from=profiler /usr/lib//x86_64-linux-gnu/libxerces-c-3.2.so /usr/lib//x86_64-linux-gnu/
|
60 |
| -COPY . /build/ocrd_cis |
| 68 | +COPY . . |
| 69 | +# prepackage ocrd-tool.json as ocrd-all-tool.json |
| 70 | +RUN ocrd ocrd-tool ocrd_cis/ocrd-tool.json dump-tools > $(dirname $(ocrd bashlib filename))/ocrd-all-tool.json |
| 71 | +# install everything and reduce image size |
61 | 72 | RUN apt-get update \
|
62 | 73 | && apt-get -y install --no-install-recommends gcc wget default-jre-headless \
|
63 |
| - && pushd /build/ocrd_cis \ |
64 | 74 | && make install \
|
65 | 75 | # test always fail, resources not available for download. Resources should be made available
|
66 | 76 | # somewhere else, e.g. github.com/OCR-D/assets
|
67 | 77 | # && make test \
|
68 |
| - && popd \ |
69 | 78 | && rm -rf /build/ocrd_cis
|
| 79 | + |
| 80 | +WORKDIR /data |
| 81 | +VOLUME /data |
0 commit comments