Changed hm Dockerfile to multistage build 92/6692/1
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 14 Sep 2021 14:23:26 +0000 (16:23 +0200)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 14 Sep 2021 14:23:53 +0000 (16:23 +0200)
Corrected image tag

Issue-ID: NONRTRIC-573

Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I3270d85e0534890664ba366e707bcb10d432ad04

helm-manager/Dockerfile
helm-manager/helm-manager.yaml

index c7de28a..90164fd 100644 (file)
 #  ============LICENSE_END=================================================
 #
 
-FROM openjdk:11-jre-slim
+FROM curlimages/curl:7.78.0 AS build
+
+#Get helm
+RUN curl -Lo /tmp/helm.tar.gz  https://get.helm.sh/helm-v3.6.1-linux-amd64.tar.gz
+
+#Get kubectl
+RUN curl -Lo /tmp/kubectl  https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl
 
-ARG JAR
 
-#Install curl and wget
-RUN apt-get update && apt-get install -y --no-install-recommends curl wget && rm -rf /var/lib/apt/lists/*
+FROM openjdk:11-jre-slim
 
 #Install helm
-RUN wget -O helm.tar.gz https://get.helm.sh/helm-v3.6.1-linux-amd64.tar.gz
+COPY --from=build /tmp/helm.tar.gz .
+
 RUN tar -zxvf helm.tar.gz
+
 RUN mv linux-amd64/helm /usr/local/bin/helm
 
-#Install kubectl and configure
-RUN curl -LO https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl
+#Install kubectl
+COPY --from=build /tmp/kubectl .
 
 RUN chmod +x ./kubectl
 
index f372b30..093752e 100644 (file)
@@ -49,7 +49,7 @@ spec:
   serviceAccountName: helm-manager-sa
   containers:
   - name: helmmanagerservice
-    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-helm-manager:1.0.0
+    image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-helm-manager:1.0.0-SNAPSHOT
     imagePullPolicy: Always
     ports:
     - name: http