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