blob: 7c1769e8b8c0d50dade728a00a34880de4016f4c [file] [log] [blame]
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -05001# Use an official Tomcat base image
Kotagiri, Ramprasad (rp5662)7019f6d2020-02-13 16:39:57 -05002FROM tomcat:8
Kotagiri, Ramprasad (rp5662)f6c222c2019-03-28 16:44:25 -04003
4ENV APPDIR /usr/local/tomcat
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -05005ENV APPUSER dash
6
Kotagiri, Ramprasad (rp5662)f6c222c2019-03-28 16:44:25 -04007COPY docker-dashboard-installation.sh /tmp/docker-dashboard-installation.sh
8COPY create_table.sql /tmp/create_table.sql
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -05009
10RUN mkdir /home/deployments \
Kotagiri, Ramprasad (rp5662)7019f6d2020-02-13 16:39:57 -050011 && mkdir -p /opt/logs/dcae/dashboard \
12 && useradd -u 1000 -M -U ${APPUSER} \
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -050013 && chown -R 1000:1000 ${APPDIR} \
14 && chown -R 1000:1000 /home/deployments \
Kotagiri, Ramprasad (rp5662)7019f6d2020-02-13 16:39:57 -050015 && chown -R 1000:1000 /opt/logs/dcae/dashboard \
16 && apt-get update \
17 && apt-get install -y sudo zip vim dos2unix postgresql \
18 && echo "dash ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dash_update_cert_store \
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -050019 && dos2unix /tmp/create_table.sql \
20 && dos2unix /tmp/docker-dashboard-installation.sh \
21 && chmod +x /tmp/create_table.sql \
22 && chmod +x /tmp/docker-dashboard-installation.sh
23
Kotagiri, Ramprasad (rp5662)f6c222c2019-03-28 16:44:25 -040024ARG WAR_FILE
Kotagiri, Ramprasad (rp5662)eef2f882019-04-08 14:18:19 -040025COPY target/${WAR_FILE} /home/deployments/ccsdk-app.war
Kotagiri, Ramprasad (rp5662)f6c222c2019-03-28 16:44:25 -040026
Kotagiri, Ramprasad (rp5662)7019f6d2020-02-13 16:39:57 -050027WORKDIR ${APPDIR}
Kotagiri, Ramprasad (rp5662)c73866c2020-02-03 13:43:25 -050028USER ${APPUSER}
Kotagiri, Ramprasad (rp5662)f6c222c2019-03-28 16:44:25 -040029
Kotagiri, Ramprasad (rp5662)a7f82862019-04-08 23:19:29 -040030CMD ["/tmp/docker-dashboard-installation.sh"]