From eed7a08de7553cb8c8caa3041e0528608a27d33d Mon Sep 17 00:00:00 2001 From: mmis Date: Tue, 17 Jul 2018 00:30:34 +0100 Subject: Set user in Dockerfile to apexuser Set the user in Dockerfile to apexuser so as the user will be set to apexuser upon container starts up. Only apexuser is permitted to start apex. Issue-ID: POLICY-866 Change-Id: Ib9e29503d8fc252760df6385a78f353e8961c3d2 Signed-off-by: mmis --- packages/apex-pdp-docker/src/main/docker/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/apex-pdp-docker/src/main/docker/Dockerfile b/packages/apex-pdp-docker/src/main/docker/Dockerfile index c16469a84..14f8a6a27 100644 --- a/packages/apex-pdp-docker/src/main/docker/Dockerfile +++ b/packages/apex-pdp-docker/src/main/docker/Dockerfile @@ -32,10 +32,11 @@ RUN chmod a+x /opt/app/policy/apex-pdp/bin/* # Copy examples to Apex user area RUN cp -pr /opt/app/policy/apex-pdp/examples /home/apexuser - -ENV PATH /opt/app/policy/apex-pdp/bin:$PATH - + RUN apt-get clean RUN chown -R apexuser:apexuser /home/apexuser/* + +USER apexuser +ENV PATH /opt/app/policy/apex-pdp/bin:$PATH WORKDIR /home/apexuser -- cgit 1.2.3-korg