summaryrefslogtreecommitdiffstats
path: root/ccsdk-app-os/Dockerfile
blob: 877f62fcba133be3cd6f49c3a9d95eb9ebb6486f (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 adoptopenjdk/openjdk11:jre-11.0.8_10-alpine
#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 update \
 && apk add wget zip dos2unix postgresql \
 && 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 \
 && addgroup -S $group && adduser -G $group -D $user \
 && chown -R $user:$group ${CATALINA_HOME} \
 && chown -R $user:$group /tmp \
 && chown -R $user:$group /opt/logs/dcae/dashboard

USER ${user}
WORKDIR $CATALINA_HOME

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