summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/des/Dockerfile
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2021-02-23 15:59:05 +0000
committerNiranjana Y <niranjana.y60@wipro.com>2021-04-13 05:45:02 +0000
commit8faf181de4478cd71466dfa3eded50aa9016e1eb (patch)
tree75cca3bdf5f143065b2a0c6841e36f7d8c463e44 /components/datalake-handler/des/Dockerfile
parent31b58dafdad9baca4ce7fe23bc78ea925691d0dd (diff)
Use non-root user to access DES database and
update the base image to align with ONAP Issue-ID: DCAEGEN2-2329 Issue-ID: DCAEGEN2-2420 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: I1fa1cdf1890efb18ac46dd3e494fe587a2a65223 Signed-off-by: vv770d <vv770d@att.com>
Diffstat (limited to 'components/datalake-handler/des/Dockerfile')
-rw-r--r--components/datalake-handler/des/Dockerfile19
1 files changed, 10 insertions, 9 deletions
diff --git a/components/datalake-handler/des/Dockerfile b/components/datalake-handler/des/Dockerfile
index e5a0af27..584ba9d6 100644
--- a/components/datalake-handler/des/Dockerfile
+++ b/components/datalake-handler/des/Dockerfile
@@ -1,5 +1,6 @@
# ============LICENSE_START===================================================
# Copyright (C) 2020 China Mobile.
+# Copyright (C) 2021 Wipro Limited
# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,15 +16,17 @@
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=====================================================
-FROM openjdk:11-jre-slim
+
+FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0
MAINTAINER Kai Lu <lukai@chinamobile.com>
EXPOSE 1681
-RUN groupadd -r datalake && useradd -r -g datalake datalake
-RUN mkdir /home/datalake/ && \
- mkdir /home/datalake/db_init
+USER root
+
+RUN addgroup datalake && adduser -G datalake -h /home/datalake -D datalake
+RUN mkdir /home/datalake/db_init
WORKDIR /home/datalake
@@ -41,10 +44,8 @@ WORKDIR /home/datalake
RUN chmod -R 0755 ./* && \
chown -R datalake:datalake /home/datalake
-RUN apt update && \
- apt install -y mariadb-client && \
- apt install -y curl
+RUN apk --update add postgresql-client curl
-#USER datalake
-CMD ["sh", "run.sh"]
+USER datalake
+ENTRYPOINT /home/datalake/run.sh