Kotagiri, Ramprasad (rp5662) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 1 | # Use an official Tomcat base image |
Kotagiri, Ramprasad (rp5662) | 7019f6d | 2020-02-13 16:39:57 -0500 | [diff] [blame] | 2 | FROM tomcat:8 |
Kotagiri, Ramprasad (rp5662) | f6c222c | 2019-03-28 16:44:25 -0400 | [diff] [blame] | 3 | |
| 4 | ENV APPDIR /usr/local/tomcat |
Kotagiri, Ramprasad (rp5662) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 5 | ENV APPUSER dash |
| 6 | |
Kotagiri, Ramprasad (rp5662) | f6c222c | 2019-03-28 16:44:25 -0400 | [diff] [blame] | 7 | COPY docker-dashboard-installation.sh /tmp/docker-dashboard-installation.sh |
| 8 | COPY create_table.sql /tmp/create_table.sql |
Kotagiri, Ramprasad (rp5662) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 9 | |
| 10 | RUN mkdir /home/deployments \ |
Kotagiri, Ramprasad (rp5662) | 7019f6d | 2020-02-13 16:39:57 -0500 | [diff] [blame] | 11 | && mkdir -p /opt/logs/dcae/dashboard \ |
| 12 | && useradd -u 1000 -M -U ${APPUSER} \ |
Kotagiri, Ramprasad (rp5662) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 13 | && chown -R 1000:1000 ${APPDIR} \ |
| 14 | && chown -R 1000:1000 /home/deployments \ |
Kotagiri, Ramprasad (rp5662) | 7019f6d | 2020-02-13 16:39:57 -0500 | [diff] [blame] | 15 | && 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) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 19 | && 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) | f6c222c | 2019-03-28 16:44:25 -0400 | [diff] [blame] | 24 | ARG WAR_FILE |
Kotagiri, Ramprasad (rp5662) | eef2f88 | 2019-04-08 14:18:19 -0400 | [diff] [blame] | 25 | COPY target/${WAR_FILE} /home/deployments/ccsdk-app.war |
Kotagiri, Ramprasad (rp5662) | f6c222c | 2019-03-28 16:44:25 -0400 | [diff] [blame] | 26 | |
Kotagiri, Ramprasad (rp5662) | 7019f6d | 2020-02-13 16:39:57 -0500 | [diff] [blame] | 27 | WORKDIR ${APPDIR} |
Kotagiri, Ramprasad (rp5662) | c73866c | 2020-02-03 13:43:25 -0500 | [diff] [blame] | 28 | USER ${APPUSER} |
Kotagiri, Ramprasad (rp5662) | f6c222c | 2019-03-28 16:44:25 -0400 | [diff] [blame] | 29 | |
Kotagiri, Ramprasad (rp5662) | a7f8286 | 2019-04-08 23:19:29 -0400 | [diff] [blame] | 30 | CMD ["/tmp/docker-dashboard-installation.sh"] |