Change pmsh baseOS img to integration- 27/120427/3
authorAlexander Mazuruk <a.mazuruk@samsung.com>
Mon, 12 Apr 2021 16:48:00 +0000 (18:48 +0200)
committerVijay Venkatesh Kumar <vv770d@att.com>
Tue, 13 Apr 2021 20:49:44 +0000 (20:49 +0000)
Benefits from switching over:
* minimal {java11,python} images maintained by integration team
* using currently "blessed by seccom" versions (:latest tag used)
* should limit spread of legal issues across layers
* integration images will be the first to have automated compliance
  documentation
* should limit spread of base layers (contributing to deployment
  footprint - more base layers = more to download, more to store etc...)

Issue-ID: INT-1864
Issue-ID: DCAEGEN2-2420
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
Change-Id: I876dd5d2294e7944d2785b98885dc990cc492635

components/pm-subscription-handler/Dockerfile
components/pm-subscription-handler/pom.xml
components/pm-subscription-handler/tox.ini
components/pm-subscription-handler/version.properties

index f154544..9e3ebfe 100644 (file)
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=====================================================
 
-FROM python:3.8.2-alpine3.11 as build
-MAINTAINER lego@est.tech
+FROM nexus3.onap.org:10001/onap/integration-python:8.0.0 as build
+LABEL maintainer="lego@est.tech"
 
+USER root
 RUN set -eux; \
     apk add \
     build-base \
@@ -31,17 +32,18 @@ COPY requirements.txt ./
 RUN pip install --prefix /opt -r requirements.txt --no-cache-dir
 
 # Second stage
-FROM python:3.8.2-alpine3.11
+FROM nexus3.onap.org:10001/onap/integration-python:8.0.0
 
 COPY --from=build /opt /opt
 
+USER root
 ARG user=onap
 ARG group=onap
 
 # set PATH & PYTHONPATH vars
 ENV APPDIR="/opt/app/pmsh" \
-    LD_LIBRARY_PATH=/opt/lib:/opt/lib64 \
-    PYTHONPATH=${APPDIR}/mod:/opt/lib/python3.8/site-packages \
+    LD_LIBRARY_PATH=/opt/lib \
+    PYTHONPATH=${APPDIR}/mod:/opt/lib/python3.9/site-packages \
     PATH=$PATH:${APPDIR}/bin \
     LOGS_PATH="/var/log/ONAP/dcaegen2/services/pmsh" \
     LOGGER_CONFIG="/opt/app/pmsh/log_config.yaml"
@@ -50,13 +52,14 @@ WORKDIR $APPDIR
 RUN mkdir -p $APPDIR
 
 RUN set -eux; \
-    apk add --no-cache postgresql-libs nano
+    apk add --no-cache postgresql-libs
 
 COPY ./pmsh_service ./bin
 COPY log_config.yaml ./
 
-# Create a group and user
-RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
+# onap user & group already avaliable, create home dir
+RUN mkdir -p /home/$user && \
+    chown -R $user:$group /home/$user && \
     mkdir -p ${LOGS_PATH} && \
     chown -R $user:$group ${LOGS_PATH} && \
     chown -R $user:$group ${APPDIR}
@@ -64,4 +67,4 @@ RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
 # Tell docker that all future commands should be run as the onap user
 USER $user
 
-ENTRYPOINT ["python", "/opt/app/pmsh/bin/pmsh_service_main.py"]
\ No newline at end of file
+ENTRYPOINT ["python", "/opt/app/pmsh/bin/pmsh_service_main.py"]
index fa341a3..d4f7eaf 100644 (file)
@@ -32,7 +32,7 @@
   <groupId>org.onap.dcaegen2.services</groupId>
   <artifactId>pmsh</artifactId>
   <name>dcaegen2-services-pm-subscription-handler</name>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.3.0-SNAPSHOT</version>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <sonar.sources>.</sonar.sources>
index 4ee06e0..6f0cb63 100644 (file)
@@ -17,7 +17,7 @@
 # ============LICENSE_END=========================================================
 
 [tox]
-envlist = flake8,py38
+envlist = flake8,py39
 skip_missing_interpreters = true
 
 [testenv]
index 00ef564..7d6815b 100644 (file)
@@ -1,5 +1,5 @@
 major=1
-minor=2
+minor=3
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}