Change base image to reduce container footprint 21/94121/1
authorkrishna <krishna.moorthy6@wipro.com>
Thu, 22 Aug 2019 13:13:57 +0000 (18:43 +0530)
committerkrishna <krishna.moorthy6@wipro.com>
Thu, 22 Aug 2019 13:18:17 +0000 (18:48 +0530)
Change-Id: I77e2f2a195836cd33be7c323ff268326a9874e65
Issue-ID: DCAEGEN2-1572
Signed-off-by: krishna <krishna.moorthy6@wipro.com>
entrypoint.sh [deleted file]
pom.xml

diff --git a/entrypoint.sh b/entrypoint.sh
deleted file mode 100755 (executable)
index 5c4541f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-#*******************************************************************************
-#  ============LICENSE_START=======================================================
-#  son-handler
-#  ================================================================================
-#   Copyright (C) 2019 Wipro Limited.
-#   ==============================================================================
-#     Licensed under the Apache License, Version 2.0 (the "License");
-#     you may not use this file except in compliance with the License.
-#     You may obtain a copy of the License at
-#  
-#          http://www.apache.org/licenses/LICENSE-2.0
-#  
-#     Unless required by applicable law or agreed to in writing, software
-#     distributed under the License is distributed on an "AS IS" BASIS,
-#     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#     See the License for the specific language governing permissions and
-#     limitations under the License.
-#     ============LICENSE_END=========================================================
-#  
-#*******************************************************************************
-
-java -jar /bin/application.jar
-
diff --git a/pom.xml b/pom.xml
index ef1c771..05e5503 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                                 <imageTag>${project.version}</imageTag>
                                                 <imageTag>latest</imageTag>
                                        </imageTags>
-                                       <baseImage>java:openjdk-8</baseImage>
+                                       <baseImage>openjdk:8-alpine</baseImage>
                                        <user>sonhms</user>
                                        <resources>
                                                <resource>
                                                        <directory>${project.build.directory}</directory>
                                                        <include>${project.artifactId}-${project.version}.jar</include>
                                                </resource>
-                                               <resource>
-                                                       <targetPath>/bin</targetPath>
-                                                       <directory>${project.basedir}</directory>
-                                                       <include>entrypoint.sh</include>
-                                               </resource>
                                        </resources>
                                        <runs>
                                                <!-- Maven is loosing file permissions during artifacts copy -->
                                                <run>adduser --disabled-password sonhms </run>
-                                               <run>chmod +x /bin/entrypoint.sh</run>
                                                <run>mv /bin/*.jar /bin/application.jar</run>
                                                <run>chmod -R 777 /bin</run>
                                        </runs>
                                        <exposes>
                                                <expose>8080</expose>
                                        </exposes>
-                                       <entryPoint>/bin/entrypoint.sh</entryPoint>
+                                       <entryPoint>java -jar /bin/application.jar</entryPoint>
                                </configuration>
 <!--
                                <executions>