Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions jetty/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@ FROM jetty:12-jdk21
ADD --chown=jetty:jetty build/jetty-base /jetty-base
ADD --chown=jetty:jetty start.sh /
ADD --chown=jetty:jetty logging.properties /

USER root

# Create a directory, download and extract the Cloud Profiler agent, version locked to "cloud-profiler-java-agent_20241028_RC00.tar.gz".
RUN mkdir -p /opt/cprof && \
wget -q -O- https://storage.googleapis.com/cloud-profiler/java/cloud-profiler-java-agent_20241028_RC00.tar.gz\
| tar xzv -C /opt/cprof && \
chown -R jetty:jetty /opt/cprof

USER jetty

EXPOSE 8080
ENTRYPOINT ["/bin/sh", "/start.sh"]
3 changes: 2 additions & 1 deletion jetty/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cd webapps
find . -maxdepth 1 -type d -name "console-*" -exec rm -rf {} +
cd /jetty-base
echo "Running ${env}"
java -Dgoogle.registry.environment=${env} \
java -agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=nomulus-frontend,-cprof_enable_heap_sampling=true \
-Dgoogle.registry.environment=${env} \
-Djava.util.logging.config.file=/logging.properties \
-jar /usr/local/jetty/start.jar
Loading