-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile
49 lines (39 loc) · 1.34 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
43
44
45
46
47
48
49
FROM openjdk:8-jdk-slim
LABEL maintainer="support@overops.com"
# Install curl
RUN apt-get update && apt-get -y install curl
RUN groupadd --gid 1000 overops
RUN adduser --home /opt/overops --uid 1000 --gid 1000 overops
# Run as overops user
USER 1000:1000
# Copy bullshier atrifacts
WORKDIR /opt/overops
# Download agent
ARG AGENT_VERSION=latest
ARG AGENT_URL=https://s3.amazonaws.com/app-takipi-com/deploy/linux/takipi-agent
RUN curl -sL ${AGENT_URL}-${AGENT_VERSION}.tar.gz | tar -xvzf -
# Copy source code to container
COPY --chown=1000:1000 ./gradle ./gradle.sh
COPY --chown=1000:1000 ./src ./src
COPY --chown=1000:1000 ./gradlew ./gradlew
COPY --chown=1000:1000 ./gradle ./gradle
COPY --chown=1000:1000 ./build.gradle ./build.gradle
COPY --chown=1000:1000 ./examples/*.sh ./examples/
COPY --chown=1000:1000 ./scripts/*.sh ./
# Precompile Colors
RUN ["/bin/bash", "./examples/white.sh"]
RUN ["/bin/bash", "./examples/yellow.sh"]
RUN ["/bin/bash", "./examples/red.sh"]
RUN ["/bin/bash", "./examples/black.sh"]
# Change Permissions (Windows Build Support)
RUN chmod u+x *.sh
RUN chmod u+x examples/*.sh
# Default Environmental Variables
ENV INERVAL_MILLIS=300
ENV RUNNING_DURATION_HOURS=0
ENV RUNNING_DURATION_MINUTES=5
ENV COLOR=white
ENV TAKIPI_COLLECTOR_HOST=collector
ENV TAKIPI_COLLECTOR_PORT=6060
ENV IS_DAEMON=true
ENTRYPOINT ["/bin/bash", "./start.sh"]