forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.jabsrv
More file actions
61 lines (43 loc) · 1.5 KB
/
Dockerfile.jabsrv
File metadata and controls
61 lines (43 loc) · 1.5 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM maven:3.9.12-amazoncorretto-25-debian AS build
# Is not debian-based
# FROM amazoncorretto:25-jdk AS build
ARG VERSION="100.0.0"
ARG VERSION_INFO="100.0.0"
ARG TAG_BUILD="false"
WORKDIR /build
COPY --from=jbangdev/jbang:0.136.0-java-21 /jbang-0.136.0/ /jbang/
ENV PATH="${PATH}:/jbang/bin"
ENV JBANG_DIR="/jbang/.jbang"
COPY gradlew .
COPY gradle gradle
RUN ./gradlew || true
COPY settings.gradle.kts .
COPY build.gradle.kts .
COPY gradle.properties .
COPY build-logic/ build-logic/
COPY build-support/ build-support/
COPY jabgui/build.gradle.kts jabgui/
COPY jabkit/build.gradle.kts jabkit/
COPY jablib/build.gradle.kts jablib/
COPY jabls/build.gradle.kts jabls/
COPY jabls-cli/build.gradle.kts jabls-cli/
COPY jabsrv/build.gradle.kts jabsrv/
COPY jabsrv-cli/build.gradle.kts jabsrv-cli/
COPY test-support test-support
COPY versions versions
# Cache gradle and build-logic
RUN ./gradlew --no-daemon :build-logic:jar
COPY . .
RUN ./gradlew --no-daemon -PprojVersion="${VERSION}" -PprojVersionInfo="${VERSION_INFO}" -Ptagbuild="${TAG_BUILD}" :jabsrv-cli:jpackage && \
mkdir /dist && \
mv jabsrv-cli/build/packages/*/* /dist
# jpackage needs glibc; alpine does not work
FROM debian:trixie-slim AS runtime
LABEL org.opencontainers.image.title="jabsrv"
LABEL org.opencontainers.image.description="JabRef's HTTP server"
LABEL org.opencontainers.image.source="https://github.com/JabRef/jabref"
WORKDIR /work
COPY --from=build /dist /jabref
# HTTP Server
EXPOSE 23119
ENTRYPOINT ["/jabref/jabsrv/bin/jabsrv"]