-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (30 loc) · 1.46 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
# -------------------------------------
FROM debian:stable-slim as download-and-extract
ARG GIT_COMMIT=master
RUN apt-get update && apt-get install -y wget
RUN wget https://github.com/ControlSystemStudio/phoebus/archive/$GIT_COMMIT.tar.gz
RUN tar -xf $GIT_COMMIT.tar.gz
RUN mv /phoebus-$GIT_COMMIT* /phoebus-src
# -------------------------------------
FROM openjdk:11-buster as builder
RUN apt-get update && apt-get install -y maven # openjfx libopenjfx-jni libopenjfx-java
COPY --from=download-and-extract /phoebus-src /phoebus-src
WORKDIR /phoebus-src
RUN mvn clean verify -f dependencies/pom.xml
# Instead of compiling all phoebus modules using:
#RUN mvn -DskipTests clean install
# we only compile the service-archive-engine and its dependencies:
#RUN mvn -DskipTests --projects :service-archive-engine --also-make clean install
# Builds intended for the public probably shouldn't skip the (slow) tests:
RUN mvn --projects :service-archive-engine --also-make clean install
# -------------------------------------
FROM openjdk:11-buster as final
ARG GIT_COMMIT=master
LABEL git_commit=$GIT_COMMIT
COPY --from=builder /phoebus-src/services/archive-engine/target /phoebus-archive-engine
WORKDIR /phoebus-archive-engine
COPY engineconfig.dtd .
# assert that all dependencies can be resolved:
RUN jdeps --class-path './lib/*' --recursive service-archive-engine-4.6.6-SNAPSHOT.jar | (! grep 'not found')
ENTRYPOINT ["java", "-jar", "./service-archive-engine-4.6.6-SNAPSHOT.jar"]
CMD ["-help"]