-
Notifications
You must be signed in to change notification settings - Fork 9
/
run.sh
executable file
·35 lines (28 loc) · 758 Bytes
/
run.sh
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
#!/bin/sh
set -x
set -e
if [ -z "${CPUS}" ]; then
CPUS=1
fi
if [ "${CPUS}" -gt 1 ]; then
SINGLETHREAD_JFR_PARSE="false"
else
SINGLETHREAD_JFR_PARSE="true"
fi
if [ -z "${MEMORY}" ]; then
MEMORY="512M"
fi
if [ -z "${MEMORY_FACTOR}" ]; then
MEMORY_FACTOR=10
fi
if [ -z "${TIMEOUT}" ]; then
TIMEOUT=30000
fi
podman run \
--user 0 \
--cpus "${CPUS}" \
--memory "${MEMORY}" \
--publish 8080:8080 \
--env JAVA_OPTS="-XX:ActiveProcessorCount=${CPUS} -XX:+PrintCommandLineFlags -Dorg.openjdk.jmc.flightrecorder.parser.singlethreaded=${SINGLETHREAD_JFR_PARSE} -Dio.cryostat.reports.memory-factor=${MEMORY_FACTOR} -Dio.cryostat.reports.timeout=${TIMEOUT}" \
--rm -it \
quay.io/cryostat/cryostat-reports:latest