-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
36 lines (30 loc) · 1.32 KB
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
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:21 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:22 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:21
RUN --mount=type=cache,id=zypper-cache,target=/var/cache/zypper \
--mount=type=cache,id=zypper-lib,target=/var/lib/zypper \
zypper --non-interactive install gettext-tools
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
ENV LANG=en_US.UTF-8
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"]