From 7dd27aa0fde4c6251acd8623c22f80e60f624868 Mon Sep 17 00:00:00 2001 From: Berndinox Date: Tue, 9 Jul 2019 09:46:34 +0200 Subject: [PATCH] Update Dockerfile --- Dockerfile | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbe43b1..0a9d9ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM node:boron-alpine as builder + RUN apk add -U build-base python WORKDIR /usr/src/app COPY . /usr/src/app @@ -7,10 +8,16 @@ RUN yarn && \ yarn install --production --ignore-scripts --prefer-offline FROM node:boron-alpine -LABEL maintainer="butlerx@notthe.cloud" +LABEL maintainer "Bernd Klaus " WORKDIR /usr/src/app + +ENV KUBE_VERSION="v1.15.0" +ENV VELERO_VERSION="v1.0.0" +ENV HELM_VERSION="v2.14.1" +ENV KUBEDB_VERSION=0.12.0 ENV NODE_ENV=production -RUN apk add -U openssh-client sshpass + +RUN apk add -U openssh-client sshpass curl git nano wget EXPOSE 3000 COPY --from=builder /usr/src/app/dist /usr/src/app/dist COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules @@ -19,4 +26,19 @@ COPY index.js /usr/src/app RUN mkdir ~/.ssh RUN ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts +ADD https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl +RUN chmod +x /usr/local/bin/kubectl \ + && wget https://github.com/heptio/velero/releases/download/v1.0.0/velero-${VELERO_VERSION}-linux-amd64.tar.gz \ + && tar -xvf velero-${VELERO_VERSION}-linux-amd64.tar.gz -C /usr/local/bin \ + && chmod +x /usr/local/bin/velero-v1.0.0-linux-amd64/velero \ + && mv /usr/local/bin/velero-${VELERO_VERSION}-linux-amd64/velero /usr/local/bin/ && rm /usr/local/bin/velero-${VELERO_VERSION}-linux-amd64 -rf \ + && wget -O kubedb https://github.com/kubedb/cli/releases/download/${KUBEDB_VERSION}/kubedb-linux-amd64 \ + && chmod +x kubedb \ + && mv kubedb /usr/local/bin/ \ + && wget https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz \ + && tar -xvf helm-${HELM_VERSION}-linux-amd64.tar.gz -C /usr/local/bin \ + && chmod +x /usr/local/bin/linux-amd64/helm \ + && mv /usr/local/bin/linux-amd64/helm /usr/local/bin/ && rm /usr/local/bin/linux-amd64 -rf + + ENTRYPOINT [ "node", "." ]