-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (21 loc) · 1.22 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
FROM adoptopenjdk/openjdk11:alpine
ARG ELASTIC_AGENT_VERSION=1.9.0
ARG ELASTIC_BEAT_VERSION=7.3.1
ARG METRICBEAT_PACKAGE=metricbeat-${ELASTIC_BEAT_VERSION}-linux-x86_64
ARG PACKETBEAT_PACKAGE=packetbeat-${ELASTIC_BEAT_VERSION}-linux-x86_64
RUN apk --no-cache add wget &&\
wget https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/$ELASTIC_AGENT_VERSION/elastic-apm-agent-$ELASTIC_AGENT_VERSION.jar -O elastic-apm-agent.jar
RUN wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELASTIC_BEAT_VERSION}-linux-x86_64.tar.gz &&\
tar xzvf ${METRICBEAT_PACKAGE}.tar.gz ${METRICBEAT_PACKAGE}/metricbeat --strip-components 1 &&\
rm ${METRICBEAT_PACKAGE}.tar.gz
RUN wget https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-${ELASTIC_BEAT_VERSION}-linux-x86_64.tar.gz &&\
tar xzvf ${PACKETBEAT_PACKAGE}.tar.gz ${PACKETBEAT_PACKAGE}/packetbeat --strip-components 1 &&\
rm ${PACKETBEAT_PACKAGE}.tar.gz
RUN apk del wget
COPY docker/metricbeat.yml metricbeat.yml
COPY docker/packetbeat.yml packetbeat.yml
COPY build/libs/sample-app-*.jar application.jar
COPY docker/entrypoint.sh entrypoint.sh
RUN chmod +x ./entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["./entrypoint.sh"]