Fix Docker image building misconceptions 07/63307/1
authorPiotr Bochenski <piotr.bochenski@nokia.com>
Tue, 28 Aug 2018 16:59:06 +0000 (18:59 +0200)
committerPiotr Bochenski <piotr.bochenski@nokia.com>
Tue, 28 Aug 2018 17:03:24 +0000 (19:03 +0200)
1. Required packages can be installed in single apt-get run.
2. vim package is not necessary since there is vi already included in base
image.
3. cmd was changed to entryPoint which breaks the ability to run image with
different command as staring point (cmd is passed as an argument to
entrypoint). Revert this change.

Change-Id: I47e128a5702200efe7c51724d5f7c07acd8f21f9
Issue-ID: DCAEGEN2-736
Signed-off-by: Piotr Bochenski <piotr.bochenski@nokia.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 56133e3..760d131 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -196,16 +196,16 @@ limitations under the License.
                         </resource>
                     </resources>
                     <runs>
-                        <run>chmod +x bin/*.sh</run>
                         <!-- Maven is loosing file permissions during artifacts copy -->
-                        <run><![CDATA[apt-get update && apt-get install -y --no-install-recommends logrotate && apt-get install -y procps && apt-get install -y vim && apt-get clean all]]></run>
+                        <run>chmod +x bin/*.sh</run>
+                        <run><![CDATA[apt-get update && apt-get install -y --no-install-recommends logrotate procps && apt-get clean all]]></run>
                         <run>chmod 0644 etc/logrotate.conf</run>
                     </runs>
                     <exposes>
                         <expose>8080</expose>
                         <expose>8443</expose>
                     </exposes>
-                    <entryPoint>bin/docker-entry.sh</entryPoint>
+                    <cmd>bin/docker-entry.sh</cmd>
                 </configuration>
                 <executions>
                     <execution>