summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/Dockerfile
diff options
context:
space:
mode:
authorAlexander Mazuruk <a.mazuruk@samsung.com>2021-04-12 18:48:00 +0200
committerVijay Venkatesh Kumar <vv770d@att.com>2021-04-13 20:49:44 +0000
commit835ad818323544acb8b030a4f274de14496d7b02 (patch)
treef06af6124945a838a333f1309aceea024aabe48c /components/pm-subscription-handler/Dockerfile
parent7d58f3fcbb69a5415b6d33ee6b30520a358342b9 (diff)
Change pmsh baseOS img to integration-
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
Diffstat (limited to 'components/pm-subscription-handler/Dockerfile')
-rw-r--r--components/pm-subscription-handler/Dockerfile21
1 files changed, 12 insertions, 9 deletions
diff --git a/components/pm-subscription-handler/Dockerfile b/components/pm-subscription-handler/Dockerfile
index f1545440..9e3ebfe8 100644
--- a/components/pm-subscription-handler/Dockerfile
+++ b/components/pm-subscription-handler/Dockerfile
@@ -17,9 +17,10 @@
# 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"]