feat: add container-tools (#44)

* feat: add container-tools bling option

* docs: container-tools description

* fix: fetch all necessary files for containers-tools in base fetch script
This commit is contained in:
Tulili 2023-09-20 13:42:18 -03:00 committed by GitHub
parent a40bcab274
commit 7bf3c4aa12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 6 deletions

View file

@ -2,12 +2,26 @@
set -euo pipefail
FILES_ROOT="/tmp/ublue-os/files"
wget -O /tmp/devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64"
install -c -m 0755 /tmp/devpod "$FILES_ROOT/usr/bin"
wget -O /tmp/devpod.rpm https://github.com/loft-sh/devpod/releases/latest/download/DevPod_linux_x86_64.rpm
mv /tmp/devpod.rpm /tmp/ublue-os/rpms
wget -O /tmp/intelmono.zip 'https://github.com/intel/intel-one-mono/releases/latest/download/ttf.zip'
unzip /tmp/intelmono.zip -d "/tmp/intelmono"
mv /tmp/intelmono/ttf "$FILES_ROOT/usr/share/fonts/intel-one-mono"
wget -O /tmp/ublue-os/rpms/devpod.rpm "https://github.com/loft-sh/devpod/releases/latest/download/DevPod_linux_x86_64.rpm"
wget -O /tmp/devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64"
install -c -m 0755 /tmp/devpod "$FILES_ROOT/usr/bin"
wget -O /tmp/docker-compose 'https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64'
install -c -m 0755 /tmp/docker-compose "$FILES_ROOT/usr/bin"
wget -O /tmp/kind "https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-amd64"
install -c -m 0755 /tmp/kind "$FILES_ROOT/usr/bin"
wget -O /tmp/kubectx "https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx"
install -c -m 0755 /tmp/kubectx "$FILES_ROOT/usr/bin"
wget -O /tmp/kubens "https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens"
install -c -m 0755 /tmp/kubens "$FILES_ROOT/usr/bin"
export DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
wget -O /tmp/ublue-os/rpms/dive.rpm "https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/dive_${DIVE_VERSION}_linux_amd64.rpm"

View file

@ -18,4 +18,6 @@ install:
# - dconf-update-service # a service unit that updates the dconf db on boot
# - devpod # https://devpod.sh/ as an rpm
# - gnome-vrr # enables gnome-vrr for your image
# - container-tools # installs container-related tools onto /usr/bin: kind, kubectx, docker-compose and kubens
```

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
install -c -m 0755 "$BLING_DIRECTORY/files/usr/bin/docker-compose" "/usr/bin/docker-compose"
install -c -m 0755 "$BLING_DIRECTORY/files/usr/bin/kind" "/usr/bin/kind"
install -c -m 0755 "$BLING_DIRECTORY/files/usr/bin/kubectx" "/usr/bin/kubectx"
install -c -m 0755 "$BLING_DIRECTORY/files/usr/bin/kubectx" "/usr/bin/kubens"
rpm-ostree install "$BLING_DIRECTORY/rpms/dive*.rpm"