Skip to content

Commit

Permalink
toolbox-cloud-cli: Add gcloud & doctl cli
Browse files Browse the repository at this point in the history
  • Loading branch information
travier committed Feb 12, 2024
1 parent 830b598 commit 3bc23a0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions toolbox-cloud-cli/Containerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
FROM registry.fedoraproject.org/fedora-toolbox:39

RUN tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM

# - Install cloud cli tools
# - Remove mlocate
RUN dnf -y distrosync && \
dnf -y install \
awscli \
azure-cli \
google-cloud-cli \
oci-cli \
vim \
zsh \
&& \
dnf -y remove mlocate && \
dnf clean all

ARG DOCTL_URL="https://github.com/digitalocean/doctl/releases/download/v1.101.0/doctl-1.101.0-linux-amd64.tar.gz"
ARG DOCTL_SHA256SUMS="f758b0c2fb7857db2bd00439155154f2ab8bee71c4f3640f90f64ec35256ca53 doctl-1.104.0-linux-amd64.tar.gz"

# Manually install doctl
RUN wget "${DOCTL_URL}" && \
echo "${DOCTL_SHA256SUMS}" | sha256sum --check && \
tar xf doctl-*-linux-amd64.tar.gz && \
rm doctl-*-linux-amd64.tar.gz && \
install -o 0 -g 0 -m 755 doctl /usr/local/bin/doctl

# No need to clear the output as we will never use ZSH as a login shell and
# this clears output when exiting toolboxes.
RUN sed -i '/clear/d' /etc/zlogout

0 comments on commit 3bc23a0

Please sign in to comment.