-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
35 lines (29 loc) · 1.29 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
FROM scratch AS sources
ARG VERSION=master
ADD https://github.com/OpenRefine/OpenRefine.git#$VERSION /opt/openrefine
FROM registry.opensuse.org/opensuse/bci/openjdk-devel:latest AS backend
WORKDIR /opt/openrefine
COPY --from=sources /opt/openrefine .
RUN --mount=type=cache,target=/root/.m2 \
mvn -B process-resources compile test-compile
FROM registry.opensuse.org/opensuse/bci/nodejs:latest AS frontend
WORKDIR /opt/openrefine/main/webapp
COPY --from=sources /opt/openrefine/main/webapp .
RUN --mount=type=cache,target=/root/.npm \
npm install
FROM registry.opensuse.org/opensuse/bci/openjdk:latest
# which is needed as command by old versions:
# - https://github.com/OpenRefine/OpenRefine/pull/5332
RUN zypper --non-interactive install gettext-tools which
WORKDIR /opt/openrefine
COPY --from=backend /opt/openrefine/server server/
COPY --from=backend /opt/openrefine/main main/
COPY --from=frontend /opt/openrefine/main/webapp/modules main/webapp/modules
COPY --from=backend /opt/openrefine/refine .
COPY entrypoint.sh refine.ini.template ./
EXPOSE 3333/TCP
ENV REFINE_MEMORY=1400M
ENV REFINE_MIN_MEMORY=1400M
HEALTHCHECK --start-period=10s CMD curl -sSf -o /dev/null http://localhost:3333
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
CMD ["/opt/openrefine/refine", "-i", "0.0.0.0", "-d", "/workspace", "run"]