From 773c8e8a465ddcded00f06fb83e5ba2b4f558d6c Mon Sep 17 00:00:00 2001 From: JesusPerez Date: Wed, 18 Aug 2021 13:36:55 +0100 Subject: [PATCH] chore: test all cloud cli downloads and remove gcloud cli --- README.md | 4 +++- repo-config.yaml | 1 - src/Dockerfile | 28 +++++++++++----------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 080f37a..ec8cee5 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,14 @@ This image includes: - [digital ocean cli](https://github.com/digitalocean/doctl) - [upcloud cli](https://github.com/UpCloudLtd/upcloud-cli) - [aws cli](https://github.com/aws/aws-cli) -- [google cloud cli](https://cloud.google.com/sdk/docs/install) - [restic](https://restic.net/) - [jq](https://stedolan.github.io/jq/) - [yq](https://mikefarah.github.io/yq/) - [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) +Not includes: +- [google cloud cli](https://cloud.google.com/sdk/docs/install) + [Container image](https://www.docker.com/resources/what-container) can be found in [**src** Dockerfile](https://repo.librecloud.services/termas_librecloud/sql-mariadb/src/branch/master/src/Dockerfile) diff --git a/repo-config.yaml b/repo-config.yaml index 3553c70..6c13860 100644 --- a/repo-config.yaml +++ b/repo-config.yaml @@ -1,4 +1,3 @@ - Active: true # Active: false # to not follow up webhook workflow diff --git a/src/Dockerfile b/src/Dockerfile index 4bab107..c57e829 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -13,12 +13,12 @@ ENV YQ_ARCH=linux_amd64 ENV RESTIC_ARCH=linux_amd64 ENV SCW_VERSION=2.3.1 -ENV SCW_ARCH=linux-amd64 +ENV SCW_ARCH=linux-x86_64 -ENV DOCTL_VERSION=1.63.3 +ENV DOCTL_VERSION=1.63.1 ENV DOCTL_ARCH=linux-amd64 -ENV AWS_VERSION=1.2022. +ENV AWS_VERSION=1.2022 ENV AWS_ARCH=linux-amd64 ENV UPCTL_VERSION="1.1.0" @@ -57,28 +57,22 @@ RUN apk update \ if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi; \ if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi ; \ rm -rf /var/cache/apk/*; \ - pip3 install jinja2 s3cmd awscli; \ + pip3 install jinja2 s3cmd awscli; \ curl -fSL "https://storage.googleapis.com/kubernetes-release/release/v${K8S_VERSION}/bin/${K8S_ARCH}/kubectl" -o /usr/local/bin/kubectl; \ chmod +x /usr/local/bin/kubectl; \ - curl -fSL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_${YQ_ARCH}" -o /usr/local/bin/yq; \ - chmod +x /usr/local/bin/yq ;\ - curl -fSl "https://github.com/scaleway/scaleway-cli/releases/download/v${SCW_VERSION}/scw-${SCW_ARCH}" -o /usr/local/bin/scw; \ + curl -fSL "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_${YQ_ARCH}" -o /usr/local/bin/yq; \ + chmod +x /usr/local/bin/yq; \ + curl -fSL "https://github.com/scaleway/scaleway-cli/releases/download/v${SCW_VERSION}/scw-${SCW_VERSION}-${SCW_ARCH}" -o /usr/local/bin/scw; \ chmod +x /usr/local/bin/scw; \ curl -fSL "https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-${DOCTL_ARCH}.tar.gz" -o /usr/local/bin/doctl; \ - chmod +x /usr/local/bin/doctl; \ + chmod +x /usr/local/bin/doctl; \ wget -q "https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_${RESTIC_ARCH}.bz2" -O /tmp/restic-${RESTIC_VERSION}.bz2; \ bunzip2 /tmp/restic-${RESTIC_VERSION}.bz2; \ mv /tmp/restic-${RESTIC_VERSION} /usr/local/bin/restic; \ chmod +x /usr/local/bin/restic; \ - rm -f /tmp/restic* ; \ - echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list; \ - curl -fSL "https://packages.cloud.google.com/apt/doc/apt-key.gpg"| apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - ;\ - apt-get update -y; \ - apt-get install google-cloud-sdk -y ; \ - curl -fSL "https://github.com/UpCloudLtd/upcloud-cli/releases/download/v${UPCTL_VERSION}/upcloud-cli_${UPCTL_VERSION}_${UPCTL_ARCH}.tar.gz" -o /tmp/upctl.tar.gz; \ - tar xvzCf /usr/local/bin /tmp/upctl.tar.gz upctl; \ - chmod +x /usr/local/bin/upctl; \ - rm -f /tmp/upctl.tar.gz + rm -f /tmp/restic*; + +# RUN curl -sSL https://sdk.cloud.google.com | bash # Add files ADD run.sh /usr/local/bin/run.sh