-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
49 lines (41 loc) · 1.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM python:3.11
ARG VCS_REF
ARG BUILD_DATE
LABEL \
maintainer="https://slub-dresden.de" \
org.label-schema.vendor="Saxon State and University Library Dresden" \
org.label-schema.name="OCR-D Monitor" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/slub/ocrd_monitor" \
org.label-schema.build-date=$BUILD_DATE \
org.opencontainers.image.vendor="Saxon State and University Library Dresden" \
org.opencontainers.image.title="OCR-D Monitor" \
org.opencontainers.image.description="Web frontend for OCR-D Manager" \
org.opencontainers.image.source="https://github.com/slub/ocrd_monitor" \
org.opencontainers.image.documentation="https://github.com/slub/ocrd_monitor/blob/${VCS_REF}/README.md" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.created=$BUILD_DATE
RUN apt-get update \
&& apt-get install -o Acquire::Retries=3 -y --no-install-recommends \
libcairo2-dev libgtk-3-bin libgtk-3-dev libglib2.0-dev \
libgtksourceview-3.0-dev libgirepository1.0-dev gir1.2-webkit2-4.0 \
python3-dev pkg-config cmake dnsutils \
&& pip3 install -U setuptools wheel \
&& pip3 install browse-ocrd
# MONITOR_PORT_LOG
EXPOSE 8080
# MONITOR_PORT_WEB
EXPOSE 5000
VOLUME /data
COPY init.sh /init.sh
COPY ocrdbrowser /usr/local/ocrd-monitor/ocrdbrowser
COPY ocrdmonitor /usr/local/ocrd-monitor/ocrdmonitor
COPY pyproject.toml /usr/local/ocrd-monitor/
COPY noxfile.py /usr/local/ocrd-monitor/
COPY tests /usr/local/ocrd-monitor/tests
RUN curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -
ENV PATH="/root/.local/bin:${PATH}"
WORKDIR /usr/local/ocrd-monitor
RUN pdm install
WORKDIR /
CMD ["/init.sh", "/data"]