forked from takipi-field/overops-event-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (27 loc) · 1.12 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
32
33
34
35
36
37
38
39
40
41
42
FROM openjdk:8-jdk-slim as BUILDER
LABEL maintainer="[email protected]"
ARG AGENT_VERSION=latest
ARG AGENT_URL=https://s3.amazonaws.com/app-takipi-com/deploy/linux/takipi-agent
WORKDIR /overops-event-generator
# install curl
RUN apt-get update && apt-get -y install curl
# copy source code to container
COPY .mvn ./.mvn
COPY src ./src
COPY mvnw mvnw.cmd pom.xml ./
RUN ./mvnw clean package -DskipTests
RUN curl -sL ${AGENT_URL}-${AGENT_VERSION}.tar.gz | tar -xvzf -
FROM openjdk:8-jre-slim
LABEL maintainer="[email protected]"
RUN groupadd --gid 1000 overops
RUN adduser --home /opt/takipi --uid 1000 --gid 1000 overops
WORKDIR /opt/takipi
COPY --from=BUILDER --chown=1000:1000 /overops-event-generator/target/overops-event-generator-*.jar .
COPY --from=BUILDER --chown=1000:1000 /overops-event-generator/takipi .
USER 1000:1000
# set default environmental variables
ENV TAKIPI_COLLECTOR_HOST=collector
ENV TAKIPI_COLLECTOR_PORT=6060
ENV JETTY_PORT=8888
ENV JAVA_TOOL_OPTIONS=-agentpath:/opt/takipi/lib/libTakipiAgent.so=takipi.debug.logconsole
ENTRYPOINT java -jar ./overops-event-generator-*.jar --server.port=${JETTY_PORT}