Switch VESCollector to Integration base image(onap/integration-java11:10.0.0) 51/126851/10
authorKasperki <pawel.kasperkiewicz@nokia.com>
Fri, 28 Jan 2022 14:17:46 +0000 (15:17 +0100)
committerKasperki <pawel.kasperkiewicz@nokia.com>
Thu, 3 Feb 2022 12:35:54 +0000 (13:35 +0100)
Change-Id: I0979707461994c1926d3809d6c68005e2e4f2624
Issue-ID: DCAEGEN2-2961
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Changelog.md
pom.xml
src/docker/Dockerfile [new file with mode: 0644]
version.properties

index 8933f11..409bb6d 100644 (file)
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [1.11.0] - 2022/01/28
+         - [DCAEGEN2-2961] - Switch VESCollector to Integration base image(onap/integration-java11:10.0.0)
+
 ## [1.10.3] - 2022/01/18
          - [DCAEGEN2-3022] - Remediation for Log4Shell vulnerability (upgrade to 2.17.1)
 
diff --git a/pom.xml b/pom.xml
index 5723d88..4649aa1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,17 +1,19 @@
 <?xml version="1.0"?>
 <!--
+    ============LICENSE_START=======================================================
+    dcaegen2-collectors-ves
     ================================================================================
-       Copyright (c) 2017-2019,2021 AT&T Intellectual Property. All rights reserved.
-       Copyright (c) 2020-2022 Nokia. All rights reserved.
-       ================================================================================
-       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=========================================================
+    Copyright (c) 2017-2019,2021 AT&T Intellectual Property. All rights reserved.
+    Copyright (c) 2020-2022 Nokia. All rights reserved.
+    ================================================================================
+    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=========================================================
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -24,7 +26,7 @@
   </parent>
   <groupId>org.onap.dcaegen2.collectors.ves</groupId>
   <artifactId>VESCollector</artifactId>
-  <version>1.10.3-SNAPSHOT</version>
+  <version>1.11.0-SNAPSHOT</version>
   <name>dcaegen2-collectors-ves</name>
   <description>VESCollector</description>
   <properties>
             <imageTag>${project.version}</imageTag>
             <imageTag>latest</imageTag>
           </imageTags>
-          <baseImage>openjdk:11.0.11-jre-slim</baseImage>
-          <user>vescollector</user>
-          <env>
-            <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
-          </env>
-          <workdir>/opt/app/VESCollector</workdir>
           <resources>
             <resource>
               <targetPath>.</targetPath>
               <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
             </resource>
           </resources>
-          <runs>
-            <run>useradd -r -U vescollector</run>
-            <run>chown -R vescollector:vescollector /opt/app</run>
-            <run>mkdir /opt/app/VESCollector/logs</run>
-            <run>chown -R vescollector:vescollector /opt/app/VESCollector/logs</run>
-            <run>chown -R vescollector:vescollector /opt/app/VESCollector/etc</run>
-            <!-- Maven is loosing file permissions during artifacts copy -->
-            <run>chmod +x bin/*.sh</run>
-            <run>
-              <![CDATA[apt-get update && apt-get install -y --no-install-recommends procps && apt-get install -y less && apt-get install -y vim && apt-get install -y curl && apt-get clean all]]></run>
-          </runs>
-          <exposes>
-            <expose>8080</expose>
-            <expose>8443</expose>
-          </exposes>
-          <cmd>bin/docker-entry.sh</cmd>
+          <dockerDirectory>src/docker</dockerDirectory>
         </configuration>
       </plugin>
     </plugins>
diff --git a/src/docker/Dockerfile b/src/docker/Dockerfile
new file mode 100644 (file)
index 0000000..3e2da43
--- /dev/null
@@ -0,0 +1,40 @@
+# ============LICENSE_START=======================================================
+#  Copyright (c) 2020-2022 Nokia. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+FROM nexus3.onap.org:10001/onap/integration-java11:10.0.0
+
+ENV HOSTALIASES /etc/host.aliases
+ARG user=vescollector
+ARG group=vescollector
+WORKDIR /opt/app/VESCollector
+
+ADD ./ ./
+USER root
+
+RUN addgroup $group && adduser --system --disabled-password --no-create-home --ingroup $group $user
+RUN chown -R vescollector:vescollector /opt/app
+RUN apk update && apk add procps && apk add less && apk add vim && apk add curl && apk add bash
+RUN mkdir /opt/app/VESCollector/logs
+RUN chown -R vescollector:vescollector /opt/app/VESCollector/logs
+RUN chown -R vescollector:vescollector /opt/app/VESCollector/etc
+RUN chmod +x bin/*.sh
+USER $user
+
+EXPOSE 8080 8443
+
+ENTRYPOINT bin/docker-entry.sh
index 35a1494..7c0c3f2 100644 (file)
@@ -1,6 +1,6 @@
 major=1
-minor=10
-patch=3
+minor=11
+patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT