Change PTL of VNFSDK to be Dan Xu
[vnfsdk/refrepo.git] / vnfmarket-be / deployment / docker / docker-refrepo / src / main / docker / Dockerfile
1 #
2 # This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
3 #
4 # vnf-sdk-marketplace/target/Dockerfile
5 #
6
7 # 10-basebuild.txt
8
9 FROM ubuntu:16.04
10 #RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
11 RUN apt-get install -y
12 RUN apt-get update --fix-missing -y
13 RUN apt-get install wget -y
14
15 WORKDIR /service
16
17
18
19 ENV JAVA_VERSION_MAJOR=8 \
20     JAVA_VERSION_MINOR=111 \
21     JAVA_HOME=/usr/lib/jvm/default-jvm \
22     PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/
23
24 RUN DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
25 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python-software-properties
26 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common sudo
27
28 RUN add-apt-repository ppa:openjdk-r/ppa -y && \
29
30     # update data from repositories
31     apt-get update --fix-missing -y && \
32
33     # upgrade OS
34     apt-get -y dist-upgrade && \
35
36     # Make info file about this build
37     printf "Build of java:openjdk-8-jre-headless, date: %s\n"  `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /service/java && \
38
39     # install application
40     apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
41
42     # fix default setting
43     ln -s java-8-openjdk-amd64  /usr/lib/jvm/default-jvm && \
44
45     # remove apt cache from image
46     apt-get clean all
47
48
49 # Set up tomcat
50 RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && rm -f apache-tomcat-8.5.30.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT
51 RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
52 ENV CATALINA_HOME /service
53
54
55 # Set up microservice
56 #ADD ./STAGE  /service
57 #RUN apt-get install -y g++ make &&  curl -sL https://rpm.nodesource.com/setup_6.x |  bash -
58 #RUN apt-get install -y nodejs
59 #RUN apt-get install -y npm
60 #RUN cd /service/webapps/onapui/vnfmarket &&  npm install phantomjs-prebuilt@2.1.14 --ignore-scripts &&  npm install
61
62
63
64 RUN add-apt-repository -y ppa:nginx/stable && \
65   apt-get update && \
66   apt-get install -y nginx && \
67   rm -rf /var/lib/apt/lists/* && \
68   echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
69   chown -R www-data:www-data /var/lib/nginx
70
71 # Define mountable directories.
72 VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]
73
74 # Define working directory.
75 WORKDIR /etc/nginx
76
77 #CMD ["nginx"]
78
79
80 EXPOSE 8702
81 EXPOSE 8703
82
83 WORKDIR /service
84
85 RUN  mkdir -p /etc/nginx/ssl
86 COPY nginx.conf /etc/nginx/nginx.conf
87 COPY certgen.sh /service
88 RUN  chmod +x /service/certgen.sh
89 RUN  /service/certgen.sh
90
91
92
93 RUN apt-get update && apt-get install nano -y
94 RUN apt-get install curl -y
95
96
97 #RUN apt-get install vim -y
98
99
100 COPY instance-config.sh .
101 COPY instance-init.sh .
102 COPY instance-run.sh .
103 COPY instance-workaround.sh .
104 COPY docker-entrypoint.sh .
105 COPY install-vtp.sh .
106 COPY vtp-tc.sh .
107
108
109 # Set up microservice
110 ADD ./STAGE  /service
111 RUN apt-get install -y g++ make &&  curl -sL https://rpm.nodesource.com/setup_6.x
112 RUN apt-get install -y nodejs
113 RUN apt-get install -y npm
114 RUN apt-get -qq update && apt-get -qq -y install bzip2
115 RUN chmod +x /service/bin/*.sh
116 RUN service nginx start &
117 RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1.14 --ignore-scripts && npm install
118
119 #VTP setup
120 RUN chmod a+x /service/install-vtp.sh
121 RUN chmod a+x /service/vtp-tc.sh
122 RUN /service/install-vtp.sh
123 EXPOSE 50051
124
125 ENTRYPOINT /service/docker-entrypoint.sh
126 RUN chmod a+x /service/docker-entrypoint.sh
127 ENTRYPOINT ["/service/docker-entrypoint.sh"]
128
129
130
131 COPY LICENSE ./ONAP_LICENSE