-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
26 lines (25 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
FROM ubuntu:20.04 as ar4k-builder
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y openjdk-8-jdk
COPY . /ar4kAgent
WORKDIR /ar4kAgent
RUN chmod +x gradlew
RUN mkdir /result
RUN ./gradlew clean generateBeaconctlShadowJar
RUN mv /ar4kAgent/beacon-beaconctl/build/libs/*-all.jar /result/beaconctl.jar
RUN ./gradlew clean generateTemplateNifiPlugin
RUN mv /ar4kAgent/beacon-template-nifi-processor/build/libs/beacon-template-nifi-processor-*.nar /result/beacon-template-nifi-processor.nar
RUN mv /ar4kAgent/beacon-template-nifi-service/build/libs/beacon-template-nifi-service-*.nar /result/beacon-template-nifi-service.nar
RUN ./gradlew clean generateOpcUaNifiPlugin
RUN mv /ar4kAgent/beacon-nifi-opcua-service-and-processor/build/libs/beacon-nifi-opcua-service-and-processor-*.nar /result/beacon-opcua.nar
#FROM ubuntu:20.04
FROM apache/nifi:1.18.0
ARG MAINTAINER="Andrea Ambrosini <andrea.ambrosini@rossonet.org>"
USER root
RUN mkdir /beacon-data && chown nifi:nifi /beacon-data
ENTRYPOINT ["java"]
CMD ["-XX:+UnlockExperimentalVMOptions","-Djava.net.preferIPv4Stack=true","-XX:+UseCGroupMemoryLimitForHeap","-XshowSettings:vm","-Djava.security.egd=file:/dev/./urandom","-jar","/beaconctl.jar"]
COPY --from=ar4k-builder /result/beaconctl.jar /beaconctl.jar
COPY --from=ar4k-builder /result/beacon-template-nifi-processor.nar /opt/nifi/nifi-current/lib/beacon-template-nifi-processor.nar
COPY --from=ar4k-builder /result/beacon-template-nifi-service.nar /opt/nifi/nifi-current/lib/beacon-template-nifi-service.nar
COPY --from=ar4k-builder /result/beacon-opcua.nar /opt/nifi/nifi-current/lib/beacon-opcua.nar
USER nifi