aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-os/Dockerfile
blob: 3a800c8d0e911df8626b5dd126b2e2ab8b256a7a (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
38
# Use an official Tomcat image
FROM tomcat:8

ENV APPDIR /usr/local/tomcat

WORKDIR ${APPDIR}

# Create deployments directory
RUN mkdir /home/deployments

# update apt-get
RUN apt-get update

# Install zip
RUN apt-get -y --allow-unauthenticated install zip

# Install vim
RUN apt-get -y --allow-unauthenticated install vim

# Install dos2unix
RUN apt-get install dos2unix -f --allow-unauthenticated

# Install postgresql
RUN apt-get -y install postgresql --allow-unauthenticated

# Download required scripts
COPY docker-dashboard-installation.sh /tmp/docker-dashboard-installation.sh
COPY create_table.sql /tmp/create_table.sql
ARG WAR_FILE
ADD target/${WAR_FILE} /home/deployments/ccsdk-app.war

# Run docker-dashboard-installation.sh
RUN dos2unix /tmp/create_table.sql
RUN dos2unix /tmp/docker-dashboard-installation.sh
RUN chmod +x /tmp/create_table.sql
RUN chmod +x /tmp/docker-dashboard-installation.sh

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