Add ARG PKG_VERSION to Dockerfile
[vfc/nfvo/driver/vnfm/svnfm.git] / huawei / vnfmadapter / VnfmadapterService / docker / Dockerfile
1 #
2 # This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
3 #
4 # nfvo-driver-vnfm-huawei/target/Dockerfile
5 #
6
7 # 10-basebuild.txt
8
9 FROM centos:7
10
11 ARG PKG_VERSION
12
13 RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
14 RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo
15 RUN yum update -y
16
17 RUN yum install -y wget unzip socat java-1.8.0-openjdk-headless
18 RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/jre/lib/security/java.security
19 ENV JAVA_HOME /usr/lib/jvm/jre
20
21 WORKDIR /service
22
23 # 20-mysq.txt
24
25 # Set up mysql
26 RUN wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm && rm -f mysql-community-release-el7-5.noarch.rpm
27 RUN yum -y update
28 RUN yum -y install -y mysql-server
29 RUN mysql_install_db --user=mysql --datadir=/var/lib/mysql
30
31 VOLUME /var/lib/mysql
32
33 COPY init-mysql.sh .
34
35 # 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
36 # Set up tomcat
37 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
38 RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
39 ENV CATALINA_HOME /service
40
41 # 50-microservice.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
42
43 # Set up microservice
44
45 RUN wget -q -O nfvo-driver-vnfm-huawei.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter&a=hw-vnfmadapter-deployment&v=${PKG_VERSION}-SNAPSHOT&e=zip" && unzip -q -o -B nfvo-driver-vnfm-huawei.zip && rm -f nfvo-driver-vnfm-huawei.zip
46 # Set permissions
47 RUN find . -type d -exec chmod o-w {} \;
48 RUN find . -name "*.sh" -exec chmod +x {} \;
49 EXPOSE 8482
50
51 # 90-entrypoint.txt
52
53 RUN yum clean all
54
55 COPY instance-config.sh .
56 COPY instance-init.sh .
57 COPY instance-run.sh .
58 COPY instance-workaround.sh .
59 COPY docker-entrypoint.sh .
60 ENTRYPOINT /service/docker-entrypoint.sh
61
62 COPY LICENSE ./ONAP_LICENSE