forked from RESOStandards/reso-web-api-reference-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (24 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
28 lines (24 loc) · 830 Bytes
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
FROM tomcat:9.0.54
# FROM tomcat:latest # latest stopped working, Nov 2021
# Debug environment variables
ENV JPDA_ADDRESS="8000"
ENV JPDA_TRANSPORT="dt_socket"
ENV ENABLE_DEBUG="false"
ENV JPDA_SUSPEND="n"
# Dynamically set JPDA_OPTS based on debug mode
ENV JPDA_OPTS=""
EXPOSE 8000
EXPOSE 8080
# Dynamically configure JPDA_OPTS based on ENABLE_DEBUG
RUN if [ "$ENABLE_DEBUG" = "true" ]; then \
export JPDA_SUSPEND="y" && \
export JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=0.0.0.0:$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"; \
else \
export JPDA_OPTS=""; \
fi && echo "JPDA_OPTS set to: $JPDA_OPTS"
# Run in debug or normal mode based on ENABLE_DEBUG
CMD if [ "$ENABLE_DEBUG" = "true" ]; then \
catalina.sh jpda run; \
else \
catalina.sh run; \
fi