Changing ownership of configuration files in APEX 25/100025/3
authora.sreekumar <ajith.sreekumar@est.tech>
Mon, 6 Jan 2020 15:48:31 +0000 (15:48 +0000)
committera.sreekumar <ajith.sreekumar@est.tech>
Mon, 6 Jan 2020 17:36:55 +0000 (17:36 +0000)
Default user when logging into APEX container is apexuser. Updating the
ownership of configuration files such as logback.xml and key files so
that these can be updated at runtime.

Change-Id: Icf21e0b408d3b4ef829e1b1c5505f142a7d08adc
Issue-ID: POLICY-2308
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
packages/apex-pdp-docker/src/main/docker/Dockerfile

index 5ae7a7c..7f208da 100644 (file)
@@ -33,9 +33,10 @@ RUN find /opt/app -type d -perm 755 \
     && find /opt/app -type f -perm 644 \
     && chmod 755 $POLICY_HOME/bin/*
 
-# Copy examples to Apex user area
+# Copy examples to Apex user area and make apexuser as the owner for files in POLICY_HOME
 RUN cp -pr $POLICY_HOME/examples /home/apexuser \
-    && chown -R apexuser:apexuser /home/apexuser/*
+    && chown -R apexuser:apexuser /home/apexuser/* $POLICY_HOME \
+    && chmod 755 $POLICY_HOME/etc/*
 
 USER apexuser
 ENV PATH $POLICY_HOME/bin:$PATH