aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile')
-rw-r--r--packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile25
1 files changed, 11 insertions, 14 deletions
diff --git a/packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile b/packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile
index 76b11119b..4a1833277 100644
--- a/packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile
+++ b/packages/policy-clamp-docker/src/main/docker/KubernetesParticipant.Dockerfile
@@ -18,9 +18,11 @@
# ============LICENSE_END=========================================================
#-------------------------------------------------------------------------------
-#
-# Docker file to build an image that runs the CLAMP ACM K8S Participant on Java 11 or better in alpine
-#
+FROM busybox AS tarball
+RUN mkdir /packages /extracted
+COPY /maven/lib/kubernetes-participant.tar.gz /packages/
+RUN tar xvzf /packages/kubernetes-participant.tar.gz --directory /extracted/
+
FROM onap/policy-jre-alpine:2.4.3
LABEL maintainer="Policy Team"
@@ -38,21 +40,16 @@ ARG POLICY_LOGS=/var/log/onap/policy/k8s-participant
ENV POLICY_LOGS=$POLICY_LOGS
ENV POLICY_HOME=$POLICY_HOME/clamp
-RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
- chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
- mkdir /packages
-COPY /maven/lib/kubernetes-participant.tar.gz /packages
+RUN mkdir -p $POLICY_HOME $POLICY_LOGS && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS
-RUN tar xvfz /packages/kubernetes-participant.tar.gz --directory $POLICY_HOME && \
- rm /packages/kubernetes-participant.tar.gz
+COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME
WORKDIR $POLICY_HOME
-COPY kubernetes-participant.sh bin/.
-COPY /maven/policy-clamp-participant-impl-kubernetes.jar /app/app.jar
+COPY --chown=policy:policy kubernetes-participant.sh bin/
+COPY --chown=policy:policy /maven/policy-clamp-participant-impl-kubernetes.jar /app/app.jar
-RUN chown -R policy:policy * && \
- chmod 755 bin/*.sh && \
- chown -R policy:policy /app && \
+RUN chmod 755 bin/*.sh && \
apk update && \
apk add wget && \
wget https://get.helm.sh/helm-v3.5.2-linux-amd64.tar.gz && \