-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
18 lines (14 loc) · 898 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM jetty:latest
ENV INSPECTIT_VERSION 1.9.3.107
ENV INSPECTIT_AGENT_HOME /opt/agent
# 1. download and unpack agent
# 2. change owner of agent folder to jetty user to have all permissions
# 3. define inspectIT start-up options in the /etc/default/jetty (jetty looks there by default)
RUN wget https://github.com/inspectIT/inspectIT/releases/download/${INSPECTIT_VERSION}/inspectit-agent-java6-${INSPECTIT_VERSION}.zip -q \
&& unzip inspectit-agent-java6-${INSPECTIT_VERSION}.zip -d /opt \
&& rm -f inspectit-agent-java6-${INSPECTIT_VERSION}.zip \
&& chown jetty:jetty -R $INSPECTIT_AGENT_HOME \
&& echo "JAVA_OPTIONS=(\"-javaagent:${INSPECTIT_AGENT_HOME}/inspectit-agent.jar\" \"-Dinspectit.repository=_CMR_ADDRESS_:_CMR_PORT_\" \"-Dinspectit.agent.name=_AGENT_NAME_\")" > /etc/default/jetty
# copy start script
COPY run-with-inspectit.sh /run-with-inspectit.sh
CMD /run-with-inspectit.sh