-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
66 lines (50 loc) · 2.11 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM opsmx11/java:14.04-openjdk-8-jdk
# Create image with the below command
# docker build --force-rm -t issuegen:<tag> .
# Run the container with the below command
# docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock issuegen:<tag> bash
# During Docker image Development testing. In container, test scripts from /tmp/gitopsmx
# docker run -it --rm -v $PWD:/tmp/gitopsmx -v /var/run/docker.sock:/var/run/docker.sock issuegen:<tag> bash
# LABEL about the custom image
LABEL maintainer="[email protected]"
LABEL version="v1.1"
LABEL description="Issue-Generator app test Blue/Green and Canary deployments"
ENV server_port=8088
ENV SERVER_PORT=8088
ENV PAGE_COLOR=green
ENV IMG_VER=v1
#WORKDIR ./
# Default shell for the RUN instruction is ["/bin/sh", "-c"], switch to bash
SHELL ["/bin/bash", "-c"]
# --- Content of original issuegen Dockerfile ---
COPY target/issuegen-0.1.jar /opt/issuegen-0.1.jar
###### for newrelic-agent only
COPY newrelic/* /opt/newrelic/
COPY datadog /opt/datadog/
COPY appdynamic /opt/appdynamic/
##for promothues-agent
#COPY prometheus/jmx_prometheus_javaagent-0.1.0.jar /opt/jmx_prometheus_javaagent-0.1.0.jar
#COPY prometheus/tomcat.yml /opt/tomcat.yml
#for DD-agent
#COPY tomcat.yaml /etc/dd-agent/conf.d/tomcat.yaml
#COPY install-dd.sh install-dd.sh
#RUN DD_API_KEY=<KEY> bash install-dd.sh
# ---
# COPY [^n]* # All files that don't start with 'n'
# COPY n[^o]* # All files that start with 'n', but not 'no'
# COPY no[^d]* # All files that start with 'no', but not 'nod'
# Copy scripts/ directory to /opt/
# RUN mkdir -p /opt/scripts #Not required. Copy will create the directory
COPY run-app.sh /usr/local/bin/run-app.sh
COPY scripts/ /opt/scripts
COPY run-in-imgbuild.sh /tmp/
# Docker creates layer for each RUN commands; Instead having multiple RUN command, putting the commands
# in a script and calling it in a RUN command creates just a single Docker layer
RUN bash /tmp/run-in-imgbuild.sh
#RUN apt-get update && apt-get install stress-ng -y
# Expose the Ports of the application
#EXPOSE 80 443
EXPOSE 8088
#ENTRYPOINT bash
#CMD [init-all.sh && run-app.sh]
CMD init-all.sh; run-app.sh