summaryrefslogtreecommitdiffstats
path: root/ccsdk-app-os/Dockerfile
blob: 46e54de438d99d07d6e68245dd72d7dc4d5afe12 (plain)
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
FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0
#FROM tomcat:jdk11-adoptopenjdk-openj9

USER root
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH

COPY docker-dashboard-installation.sh /tmp/docker-dashboard-installation.sh
COPY create_table.sql /tmp/create_table.sql
COPY target/ccsdk*.war /tmp/ccsdk-app.war

ARG user=onap
ARG group=onap

RUN apk add --update --no-cache --virtual .setup-deps wget dos2unix \
 && apk add postgresql zip \
 && wget -q http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz \
 && tar -xzf apache-tomcat-9.0.37.tar.gz \
 && rm -f apache-tomcat-9.0.37.tar.gz \
 && rm -fr apache-tomcat-9.0.37/webapps/[a-z]* \
 && mkdir -p ${CATALINA_HOME} \
 && mv apache-tomcat-9.0.37/* ${CATALINA_HOME} \
 && mkdir -p /opt/logs/dcae/dashboard \
 && dos2unix /tmp/create_table.sql \
 && dos2unix /tmp/docker-dashboard-installation.sh \
 && chmod +x /tmp/create_table.sql \
 && chmod +x /tmp/docker-dashboard-installation.sh \
 && chown -R $user:$group ${CATALINA_HOME} \
 && chown -R $user:$group /tmp \
 && chown -R $user:$group /opt/logs/dcae/dashboard \
 && apk del .setup-deps

USER ${user}
WORKDIR $CATALINA_HOME

ENTRYPOINT /tmp/docker-dashboard-installation.sh
#CMD ["/tmp/docker-dashboard-installation.sh"]