-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathDockerfile-jdk8
34 lines (26 loc) · 1.13 KB
/
Dockerfile-jdk8
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
###########################################
### Build Stage ###
###########################################
FROM maven:3.8.6-openjdk-8-slim AS maven-builder
COPY ./resources/server /usr/src/app
WORKDIR /usr/src/app
RUN mvn clean package
###########################################
### Container Stage ###
###########################################
FROM openjdk:8u111-jre-alpine
COPY ./resources/trust/store.p12 /opt/store.p12
COPY ./resources/scripts/start.sh /opt/start.sh
COPY ./resources/conf/policy /opt/policy
COPY --from=maven-builder /usr/src/app/target/rmg-example-server-*-jar-with-dependencies.jar /opt/example-server.jar
RUN set -ex \
&& chmod +x /opt/start.sh
ENV _JAVA_OPTIONS -Djava.rmi.server.hostname=iinsecure.example \
-Djavax.net.ssl.keyStorePassword=password \
-Djavax.net.ssl.keyStore=/opt/store.p12 \
-Djavax.net.ssl.keyStoreType=pkcs12 \
-Djava.rmi.server.useCodebaseOnly=false \
-Djava.security.policy=/opt/policy \
-Djava.rmi.server.codebase=http://iinsecure.example/well-hidden-development-folder/
EXPOSE 1090/tcp 1098/tcp 9010/tcp
CMD ["/opt/start.sh"]