1 # Copyright 2020 Huawei Technologies Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
17 # vnf-sdk-marketplace/target/Dockerfile
23 #RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
24 RUN apt-get install -y
25 RUN apt-get update --fix-missing -y
26 RUN apt-get install wget -y
32 ENV JAVA_VERSION_MAJOR=8 \
33 JAVA_VERSION_MINOR=111 \
34 JAVA_HOME=/usr/lib/jvm/default-jvm \
35 PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/
37 RUN DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
38 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python-software-properties
39 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common sudo
41 RUN add-apt-repository ppa:openjdk-r/ppa -y && \
42 # update data from repositories
43 apt-get update --fix-missing -y && \
45 apt-get -y dist-upgrade && \
46 # Make info file about this build
47 printf "Build of java:openjdk-8-jre-headless, date: %s\n" `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /service/java && \
49 apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
51 ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-jvm && \
52 # remove apt cache from image
56 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
57 RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
58 ENV CATALINA_HOME /service
63 #RUN apt-get install -y g++ make && curl -sL https://rpm.nodesource.com/setup_6.x | bash -
64 #RUN apt-get install -y nodejs
65 #RUN apt-get install -y npm
66 #RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1.14 --ignore-scripts && npm install
70 RUN add-apt-repository -y ppa:nginx/stable && \
72 apt-get install -y nginx && \
73 rm -rf /var/lib/apt/lists/* && \
74 echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
75 chown -R www-data:www-data /var/lib/nginx
77 # Define mountable directories.
78 VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]
80 # Define working directory.
91 RUN mkdir -p /etc/nginx/ssl
92 COPY nginx.conf /etc/nginx/nginx.conf
93 COPY certgen.sh /service
94 RUN chmod +x /service/certgen.sh
95 RUN /service/certgen.sh
99 RUN apt-get update && apt-get install nano -y
100 RUN apt-get install curl -y
103 #RUN apt-get install vim -y
106 COPY instance-config.sh .
107 COPY instance-init.sh .
108 COPY instance-run.sh .
109 COPY instance-workaround.sh .
110 COPY docker-entrypoint.sh .
111 COPY install-vtp.sh .
115 # Set up microservice
117 RUN apt-get install -y g++ make && curl -sL https://rpm.nodesource.com/setup_6.x
118 RUN apt-get install -y nodejs
119 RUN apt-get install -y npm
120 RUN apt-get -qq update && apt-get -qq -y install bzip2
121 RUN chmod +x /service/bin/*.sh
122 RUN service nginx start &
123 RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1.14 --ignore-scripts && npm install
126 RUN chmod a+x /service/install-vtp.sh
127 RUN chmod a+x /service/vtp-tc.sh
128 RUN /service/install-vtp.sh
131 RUN groupadd -r vnfadmin && useradd -m --no-log-init -r -g vnfadmin vnfadmin && \
132 usermod -aG sudo vnfadmin && echo "vnfadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
133 chmod -R 777 /usr/local/
137 RUN umask 000 && sudo chmod +x /service/bin/*.sh /service/*.sh && \
138 mkdir -p /service/logs && mkdir -p /var/log/nginx/ && \
139 sudo chown -R vnfadmin:vnfadmin /var/log/nginx/ && \
140 sudo chown -R vnfadmin:vnfadmin /service/ /opt/vtp /var/log && \
141 sudo chmod -R +w /service/ /opt/vtp /var/log && \
142 sudo touch /run/nginx.pid && sudo chown -R vnfadmin:vnfadmin /run/nginx.pid && \
143 chmod +w /run/nginx.pid && sudo chown -R vnfadmin:vnfadmin /var/log/nginx/ && \
144 sudo usermod -aG www-data vnfadmin && sudo chmod -R a+w /var/lib/nginx
147 #ENTRYPOINT /service/docker-entrypoint.sh
148 ENTRYPOINT ["/service/docker-entrypoint.sh"]
152 COPY LICENSE ./ONAP_LICENSE