summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-09-16 14:54:42 +0530
committermukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-09-16 14:54:42 +0530
commitda769607edb894cbd9e473caed7312156be2a825 (patch)
treedd4e64f30fee280d9ecdfaed2ab027be76f17cc5
parent2e634af596e432a06348ec60b34dc91391817e51 (diff)
Docker container is not up invalid user1.2.2
Issue-ID: DCAEGEN2-2281 Signed-off-by: mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> Change-Id: I310f07b172e0442cdd316ac91fcd58213a2a8778
-rw-r--r--pom.xml7
1 files changed, 5 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 2479d11..6c525ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@ limitations under the License.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<docker.image.name>onap/org.onap.dcaegen2.collectors.restconfcollector</docker.image.name>
- <docker.user.name>restconf</docker.user.name>
+ <docker.user.name>restconfcollector</docker.user.name>
<docker.user.dir>/opt/app/restconfcollector</docker.user.dir>
<!-- TEST SETTINGS -->
<surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
@@ -204,6 +204,7 @@ limitations under the License.
<imageTag>latest</imageTag>
</imageTags>
<baseImage>openjdk:11-jre-slim</baseImage>
+ <user>${docker.user.name}</user>
<env>
<HOSTALIASES>/etc/host.aliases</HOSTALIASES>
</env>
@@ -215,7 +216,9 @@ limitations under the License.
</resource>
</resources>
<runs>
- <run>adduser -h ${docker.user.dir} -D ${docker.user.name}; chown -R ${docker.user.name}: ${docker.user.dir}; chmod +x ${docker.user.dir}/bin/*.sh</run>
+ <run>useradd -r -U ${docker.user.name}</run>
+ <run>chown -R ${docker.user.name}:${docker.user.name} ${docker.user.dir}</run>
+ <run>chmod +x ${docker.user.dir}/bin/*.sh</run>
</runs>
<cmd>${docker.user.dir}/bin/docker_entry.sh</cmd>
<exposes>