summaryrefslogtreecommitdiffstats
path: root/packages/apex-pdp-docker/src/main/docker/suse.Dockerfile
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2022-10-25 16:14:16 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2022-10-26 16:31:57 +0100
commit2e80c5de293bcd24b36c88eacb4d862a17435c26 (patch)
tree5123efc3312fe02490333f3a0a819179e55f2352 /packages/apex-pdp-docker/src/main/docker/suse.Dockerfile
parent84f095f4b5a6329a8568c50d997b926d86bf18ab (diff)
Make apex-pdp dockerfile consistent
Make apex dockerfile consistent with other PF dockerfiles: Change apexuser to policy user Remove duplicate copy of examples directory Issue-ID: POLICY-4411 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iee7560cf3263d13d38cd829af9b0389cbc256f49
Diffstat (limited to 'packages/apex-pdp-docker/src/main/docker/suse.Dockerfile')
-rw-r--r--packages/apex-pdp-docker/src/main/docker/suse.Dockerfile20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/apex-pdp-docker/src/main/docker/suse.Dockerfile b/packages/apex-pdp-docker/src/main/docker/suse.Dockerfile
index d947a3cc7..9921f45e6 100644
--- a/packages/apex-pdp-docker/src/main/docker/suse.Dockerfile
+++ b/packages/apex-pdp-docker/src/main/docker/suse.Dockerfile
@@ -38,19 +38,21 @@ LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
ARG POLICY_LOGS=/var/log/onap/policy/apex-pdp
ENV POLICY_HOME=/opt/app/policy/apex-pdp
ENV POLICY_LOGS=$POLICY_LOGS
+ENV APEX_HOME=$POLICY_HOME
+ENV APEX_USER=policy
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
ENV JAVA_HOME=/usr/lib64/jvm/java-11-openjdk-11
-RUN zypper -n -q install --no-recommends java-11-openjdk-devel netcat-openbsd \
- && zypper -n -q update && zypper -n -q clean --all \
- && groupadd --system apexuser && useradd --system --shell /bin/sh -G apexuser apexuser \
- && mkdir -p $POLICY_HOME $POLICY_LOGS \
- && chown -R apexuser:apexuser $POLICY_HOME $POLICY_LOGS
+RUN zypper -n -q install --no-recommends java-11-openjdk-devel netcat-openbsd && \
+ zypper -n -q update && zypper -n -q clean --all && \
+ groupadd --system policy && \
+ useradd --system --shell /bin/sh -G policy policy && \
+ mkdir -p $POLICY_HOME $POLICY_LOGS && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS
-COPY --chown=apexuser:apexuser --from=tarball /extracted $POLICY_HOME
-RUN cp -pr $POLICY_HOME/examples /home/apexuser
+COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME
-USER apexuser
+USER $APEX_USER
ENV PATH $POLICY_HOME/bin:$PATH
-WORKDIR /home/apexuser
+WORKDIR $APEX_HOME
ENTRYPOINT [ "/bin/sh" ]