-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
39 lines (34 loc) · 1.18 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 amazoncorretto:8u382
ARG JAR_LIBS
ARG JAR_FILE
ARG VERSION
ARG BUILD
ARG SERVICE_NAME
ARG SWAGGER_UI
LABEL "com.ubirch.service"="${SERVICE_NAME}"
LABEL "com.ubirch.version"="${VERSION}"
LABEL "com.ubirch.build"="${BUILD}"
EXPOSE 9010
EXPOSE 9020
EXPOSE 4321
ENV _JAVA_OPTIONS "-Xms128m -Xmx256m -Djava.awt.headless=true"
ENTRYPOINT [ \
"/usr/bin/java", \
"-Djava.security.egd=file:/dev/./urandom", \
"-Djava.rmi.server.hostname=localhost", \
"-Dcom.sun.management.jmxremote", \
"-Dcom.sun.management.jmxremote.port=9010", \
"-Dcom.sun.management.jmxremote.rmi.port=9010", \
"-Dcom.sun.management.jmxremote.local.only=false", \
"-Dcom.sun.management.jmxremote.authenticate=false", \
"-Dcom.sun.management.jmxremote.ssl=false", \
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9020", \
"-Dconfig.resource=application-docker.conf", \
"-Dlogback.configurationFile=logback-docker.xml", \
"-jar", "/usr/share/service/main.jar" \
]
# Add Maven dependencies (not shaded into the artifact; Docker-cached)
COPY ${JAR_LIBS} /usr/share/service/lib
COPY ${SWAGGER_UI} /usr/share/service/swagger
# Add the service itself
COPY ${JAR_FILE} /usr/share/service/main.jar