-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
46 lines (32 loc) · 1022 Bytes
/
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
# syntax=docker/dockerfile:1
FROM gradle:jdk8-jammy as builder
WORKDIR /build
COPY . .
RUN cd ./jdnssec-dnsjava \
&& ../gradlew build -x test \
&& ../gradlew publishToMavenLocal
RUN cd ./jdnssec-tools \
&& ../gradlew build -x test \
&& ../gradlew publishToMavenLocal
RUN cd ./gmp-rsa \
&& ../gradlew build -x test \
&& ../gradlew publishToMavenLocal
RUN cd ./pdns-output \
&& ../gradlew shadowJar -x test
FROM java:openjdk-8u111-jre AS final
ARG UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
pdns-output
RUN mkdir /etc/dim \
&& chown pdns-output:pdns-output /etc/dim
COPY --chown=pdns-output:pdns-output ./pdns-output/src/main/resources/* /etc/dim/
USER pdns-output
ARG VERSION=4.0.0
COPY --from=builder /build/pdns-output/build/libs/pdns-output-${VERSION}-all.jar /opt/pdns-output.jar
ENTRYPOINT [ "/usr/bin/java", "-jar", "/opt/pdns-output.jar" ]