Fix sniroemulator to make container arm64-ready 17/79017/1
authorDmitry Puzikov <dmitry.puzikov@tieto.com>
Thu, 21 Feb 2019 15:30:05 +0000 (16:30 +0100)
committerDmitry Puzikov <dmitry.puzikov@tieto.com>
Fri, 22 Feb 2019 14:07:03 +0000 (15:07 +0100)
Swicth from debian based image to alpine based image.

Fix docker-plugin version.

Change-Id: I87af14b9785f70f49955ba299ed6e3d8ff9866f3
Issue-ID: INT-879
Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
test/mocks/sniroemulator/pom.xml
test/mocks/sniroemulator/src/main/docker/Dockerfile

index 288ecb6..2a1402b 100644 (file)
 </parent>
 
 <properties>
-    <dockerLocation>${basedir}/target</dockerLocation>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <java.version>1.8</java.version>
+    <dockerLocation>${basedir}/target</dockerLocation>
+    <docker.tag>latest</docker.tag>
+    <docker.maven.plugin.version>1.2.0</docker.maven.plugin.version>
     <versions.jackson>2.8.9</versions.jackson>
     <jetty.version>9.2.22.v20170606</jetty.version>
     <start-class>org.onap.integration.test.mocks.sniroemulator.MockApplication</start-class>
         <plugin>
             <groupId>com.spotify</groupId>
             <artifactId>docker-maven-plugin</artifactId>
-            <version>1.0.0</version>
+            <version>${docker.maven.plugin.version}</version>
             <configuration>
                 <verbose>true</verbose>
                 <registryUrl>${docker.push.registry}</registryUrl>
                 <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
                 <dockerDirectory>${dockerLocation}</dockerDirectory>
                 <imageTags>
-                    <imageTag>latest</imageTag>
+                    <imageTag>${docker.tag}</imageTag>
                 </imageTags>
                 <forceTags>true</forceTags>
             </configuration>
index 05f3a5a..65e129a 100644 (file)
@@ -1,10 +1,13 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 MAINTAINER Geora Barsky <georab@amdocs.com>
 
+# need bash as most scripts expect it
+RUN apk --no-cache add bash
+
 RUN mkdir -p /var/wiremock/lib/ 
 
-ADD sniroemulator.jar /var/wiremock/lib/app.jar
+COPY sniroemulator.jar /var/wiremock/lib/app.jar
 
 WORKDIR /home/wiremock