summaryrefslogtreecommitdiffstats
path: root/nokiav2/deployment/Dockerfile
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-05-02 12:24:54 +0200
committerDenes Nemeth <denes.nemeth@nokia.com>2018-05-02 12:24:54 +0200
commit4dc3d0aaae1f11499357839dac9e92f13ce0e934 (patch)
tree1a7edc43d835a7dcea6532d743dfa6bfc117410b /nokiav2/deployment/Dockerfile
parent88a64ebf39dea43a4f0d69d18e5ab5933febea98 (diff)
Fix image propagation to nexus
Change-Id: Ib3e5a7336ec7c9c70d6b7fde25b3aea42344e76f Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728
Diffstat (limited to 'nokiav2/deployment/Dockerfile')
-rwxr-xr-xnokiav2/deployment/Dockerfile20
1 files changed, 20 insertions, 0 deletions
diff --git a/nokiav2/deployment/Dockerfile b/nokiav2/deployment/Dockerfile
new file mode 100755
index 00000000..68bdb18a
--- /dev/null
+++ b/nokiav2/deployment/Dockerfile
@@ -0,0 +1,20 @@
+FROM centos:7
+WORKDIR /service
+ARG REPO
+ARG MODE
+COPY src/main/resources/docker-entrypoint.sh .
+COPY src/main/resources/LICENSE ./ONAP_LICENSE
+COPY src/main/resources/application.properties .
+RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
+RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo
+RUN yum -y update && \
+ yum -y install java-1.8.0-openjdk-headless wget && \
+ yum -y install mc vim tcpdump net-tools nc strace telnet unzip && \
+ yum clean all
+COPY pom.xml pom.xml
+RUN VERSION=`echo -e "setns x=http://maven.apache.org/POM/4.0.0 \n xpath /x:project/x:version/text() "| xmllint --shell pom.xml | grep content | sed 's/.*content=//'| sed 's/-SNAPSHOT//'` ; wget -q -O driver.war "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2&a=driverwar&v=${VERSION}${MODE}&e=war"
+#Can be used for local builds instead of the previous line
+#COPY driver.war .
+ENV JAVA_HOME /usr/lib/jvm/jre
+EXPOSE 8089
+ENTRYPOINT /service/docker-entrypoint.sh