-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toolbox-cloud-cli: Add gcloud & doctl cli
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,39 @@ | ||
FROM registry.fedoraproject.org/fedora-toolbox:39 | ||
|
||
COPY <<EOF /etc/yum.repos.d/google-cloud-sdk.repo | ||
[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 | ||
EOF | ||
|
||
# - 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 |