-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (33 loc) · 1.59 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
FROM alpine:latest
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
RUN apk update && apk add openjdk21-jre maven git bash
LABEL maintainer="[email protected]"
COPY . /build
RUN mvn -v && \
git clone https://github.com/icann/rdap-conformance-tool && \
cd rdap-conformance-tool && \
mvn help:evaluate -Dexpression=project.version -q -DforceStdout > version.txt && \
RDAPCT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) && \
echo $RDAPCT_VERSION && \
sed -i "s|\$[{]rdap-conformance.version[}]|$RDAPCT_VERSION|" /rdap-conformance-tool/pom.xml && \
sed -i "s|\$[{]rdap-conformance.version[}]|$RDAPCT_VERSION|" /rdap-conformance-tool/tool/pom.xml && \
sed -i "s|\$[{]rdap-conformance.version[}]|$RDAPCT_VERSION|" /rdap-conformance-tool/validator/pom.xml && \
sed -i "s|\$[{]rdap-conformance.version[}]|$RDAPCT_VERSION|" /rdap-conformance-tool/jitpack/pom.xml && \
cat pom.xml && \
mvn install -DskipTests && \
mkdir /app && \
cd / && \
cp rdap-conformance-tool/tool/bin/rdapct_config.json build/src/main/resources && \
cd build && \
chmod +x scripts/fix_versions.sh && \
bash -xe scripts/fix_versions.sh $RDAPCT_VERSION && \
cat pom.xml && \
mvn package && \
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) && \
cp target/rdapconformancefe-$VERSION.jar /app/app.jar && \
cp target/classes/rdapct_config.json /app/rdapct_config.json
WORKDIR /app
RUN chown nobody /app
ENV RDAPCT /app
USER nobody
ENTRYPOINT ["java","-jar","app.jar"]