2 # This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
4 # vnf-sdk-marketplace/target/Dockerfile
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
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/
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
28 RUN add-apt-repository ppa:openjdk-r/ppa -y && \
29 # update data from repositories
30 apt-get update --fix-missing -y && \
32 apt-get -y dist-upgrade && \
33 # Make info file about this build
34 printf "Build of java:openjdk-8-jre-headless, date: %s\n" `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /service/java && \
36 apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
38 ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-jvm && \
39 # remove apt cache from image
43 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
44 RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
45 ENV CATALINA_HOME /service
50 #RUN apt-get install -y g++ make && curl -sL https://rpm.nodesource.com/setup_6.x | bash -
51 #RUN apt-get install -y nodejs
52 #RUN apt-get install -y npm
53 #RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1.14 --ignore-scripts && npm install
57 RUN add-apt-repository -y ppa:nginx/stable && \
59 apt-get install -y nginx && \
60 rm -rf /var/lib/apt/lists/* && \
61 echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
62 chown -R www-data:www-data /var/lib/nginx
64 # Define mountable directories.
65 VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]
67 # Define working directory.
78 RUN mkdir -p /etc/nginx/ssl
79 COPY nginx.conf /etc/nginx/nginx.conf
80 COPY certgen.sh /service
81 RUN chmod +x /service/certgen.sh
82 RUN /service/certgen.sh
86 RUN apt-get update && apt-get install nano -y
87 RUN apt-get install curl -y
90 #RUN apt-get install vim -y
93 COPY instance-config.sh .
94 COPY instance-init.sh .
95 COPY instance-run.sh .
96 COPY instance-workaround.sh .
97 COPY docker-entrypoint.sh .
102 # Set up microservice
104 RUN apt-get install -y g++ make && curl -sL https://rpm.nodesource.com/setup_6.x
105 RUN apt-get install -y nodejs
106 RUN apt-get install -y npm
107 RUN apt-get -qq update && apt-get -qq -y install bzip2
108 RUN chmod +x /service/bin/*.sh
109 RUN service nginx start &
110 RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1.14 --ignore-scripts && npm install
113 RUN chmod a+x /service/install-vtp.sh
114 RUN chmod a+x /service/vtp-tc.sh
115 RUN /service/install-vtp.sh
118 RUN groupadd -r vnfadmin && useradd -m --no-log-init -r -g vnfadmin vnfadmin && \
119 usermod -aG sudo vnfadmin && echo "vnfadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
120 chmod -R 777 /usr/local/
124 RUN RUN umask 000 && sudo chmod +x /service/bin/*.sh /service/*.sh && \
125 mkdir -p /service/logs && mkdir -p /var/log/nginx/ && \
126 sudo chown -R vnfadmin:vnfadmin /var/log/nginx/ && \
127 sudo chown -R vnfadmin:vnfadmin /service/ /opt/vtp /var/log && \
128 sudo chmod -R +w /service/ /opt/vtp /var/log && \
129 sudo touch /run/nginx.pid && sudo chown -R vnfadmin:vnfadmin /run/nginx.pid && \
130 chmod +w /run/nginx.pid && sudo chown -R vnfadmin:vnfadmin /var/log/nginx/ && \
131 sudo usermod -aG www-data vnfadmin && sudo chmod -R a+w /var/lib/nginx
134 #ENTRYPOINT /service/docker-entrypoint.sh
135 ENTRYPOINT ["/service/docker-entrypoint.sh"]
139 COPY LICENSE ./ONAP_LICENSE