BjornMagnussonXA | 31b0988 | 2021-06-02 01:56:26 +0200 | [diff] [blame] | 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 openjdk:11-jre-slim |
| 19 | |
| 20 | ARG JAR |
| 21 | |
| 22 | #Install curl |
| 23 | RUN apt-get update |
| 24 | RUN apt-get install -y curl |
| 25 | |
| 26 | #Install helm |
| 27 | RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 |
| 28 | RUN chmod 700 get_helm.sh |
| 29 | RUN ./get_helm.sh |
| 30 | |
| 31 | #Install kubectl and configure |
| 32 | RUN curl -LO https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl |
| 33 | |
| 34 | RUN chmod +x ./kubectl |
| 35 | |
| 36 | RUN mv ./kubectl /usr/local/bin/kubectl |
| 37 | |
| 38 | # Copy app config and app jar |
| 39 | WORKDIR /opt/app/helm-manager/src/main/resources/config |
| 40 | |
| 41 | COPY config/KubernetesParticipantConfig.json . |
| 42 | COPY config/application.yaml . |
| 43 | |
| 44 | WORKDIR /opt/app/helm-manager |
| 45 | COPY target/app.jar app.jar |
| 46 | |
| 47 | CMD [ "java", "-jar", "app.jar" ] |