Change base image of helm-manager to alpine
[nonrtric.git] / helm-manager / Dockerfile
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2020 Nordix Foundation. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 FROM adoptopenjdk/openjdk11:jre-11.0.11_9-alpine
19
20 ARG JAR
21
22 #Install wget
23 RUN apk update && apk add wget
24
25 #Install helm
26 RUN wget -O helm.tar.gz https://get.helm.sh/helm-v3.6.1-linux-amd64.tar.gz
27 RUN tar -zxvf helm.tar.gz
28 RUN mv linux-amd64/helm /usr/local/bin/helm
29
30 #Install kubectl and configure
31 RUN wget https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl
32
33 RUN chmod +x ./kubectl
34
35 RUN mv ./kubectl /usr/local/bin/kubectl
36
37 # Copy app config and app jar
38 WORKDIR /opt/app/helm-manager/src/main/resources/config
39
40 COPY config/KubernetesParticipantConfig.json .
41 COPY config/application.yaml .
42
43 WORKDIR /opt/app/helm-manager
44 COPY target/app.jar app.jar
45
46 CMD [ "java", "-jar", "app.jar" ]