From f2a1766289145aae169e8230991c9828264ff655 Mon Sep 17 00:00:00 2001 From: Albert de Palo Hardvendel <71041549+Albert-LGTM@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:03:50 +0100 Subject: [PATCH] Added support for installing podman (#787) * Added support for installing podman * removed llm comment * Added podman to userguide * Added support for install pythona and pip in case of missing. changed pip install to rootless install * changed installing podman-compose with pip to packagemanager * Update core/tabs/applications-setup/podman-setup.sh Only install Podman if it is not installed already. Co-authored-by: nyx * Update core/tabs/applications-setup/podman-setup.sh Only install podman-compose if it is not installed already. Co-authored-by: nyx * added podman-compose install option * split podman install into podman and podman-compose * Update core/tabs/applications-setup/podman-setup.sh Co-authored-by: nyx * Update core/tabs/applications-setup/podman-setup.sh Co-authored-by: nyx * Update core/tabs/applications-setup/podman-compose-setup.sh Co-authored-by: nyx * Update core/tabs/applications-setup/podman-compose-setup.sh Co-authored-by: nyx * Update core/tabs/applications-setup/podman-compose-setup.sh Removed redundant quotes Co-authored-by: JEEVITHA KANNAN K S * Update core/tabs/applications-setup/podman-setup.sh Removed redundant quotes Co-authored-by: JEEVITHA KANNAN K S --------- Co-authored-by: nyx Co-authored-by: JEEVITHA KANNAN K S Co-authored-by: Chris Titus --- .../podman-compose-setup.sh | 33 +++++++++++++++++++ core/tabs/applications-setup/podman-setup.sh | 33 +++++++++++++++++++ core/tabs/applications-setup/tab_data.toml | 12 +++++++ docs/userguide.md | 3 ++ 4 files changed, 81 insertions(+) create mode 100644 core/tabs/applications-setup/podman-compose-setup.sh create mode 100644 core/tabs/applications-setup/podman-setup.sh diff --git a/core/tabs/applications-setup/podman-compose-setup.sh b/core/tabs/applications-setup/podman-compose-setup.sh new file mode 100644 index 00000000..02db3ed7 --- /dev/null +++ b/core/tabs/applications-setup/podman-compose-setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPodmanCompose() { + if ! command_exists podman-compose; then + printf "%b\n" "${YELLOW}Installing Podman Compose...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman-compose + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install podman-compose + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman-compose + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman-compose + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Podman Compose is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPodmanCompose diff --git a/core/tabs/applications-setup/podman-setup.sh b/core/tabs/applications-setup/podman-setup.sh new file mode 100644 index 00000000..07a0b5f6 --- /dev/null +++ b/core/tabs/applications-setup/podman-setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPodman() { + if ! command_exists podman; then + printf "%b\n" "${YELLOW}Installing Podman...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install podman + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Podman is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPodman diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index dce7fa79..20233a92 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -228,6 +228,18 @@ description = "Docker is an open platform that uses OS-level virtualization to d script = "docker-setup.sh" task_list = "I SS" +[[data]] +name = "Podman" +description = "Podman is a daemon-less open platform that uses OS-level virtualization to deliver software in packages called containers." +script = "podman-setup.sh" +task_list = "I SS" + +[[data]] +name = "Podman-compose" +description = "Podman Compose is a tool for defining and running multi-container applications using Podman." +script = "podman-compose-setup.sh" +task_list = "I SS" + [[data]] name = "DWM-Titus" description = "DWM is a dynamic window manager for X.\nIt manages windows in tiled, monocle and floating layouts.\nAll of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.\nThis command installs and configures DWM and a desktop manager.\nThe list of patches applied can be found in CTT's DWM repository\nhttps://github.com/ChrisTitusTech/dwm-titus" diff --git a/docs/userguide.md b/docs/userguide.md index e3f50c81..d845e67f 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -56,6 +56,9 @@ All of the layouts can be applied dynamically, optimising the environment for th This command installs and configures DWM and a desktop manager. The list of patches applied can be found in CTT's DWM repository https://github.com/ChrisTitusTech/dwm-titus +- **Docker**: Docker is an open platform that uses OS-level virtualization to deliver software in packages called containers. +- **Podman**: Podman is a daemon-less open platform that uses OS-level virtualization to deliver software in packages called containers. +- **Podman-compose**: Podman Compose is a tool for defining and running multi-container applications using Podman. - **Fastfetch**: Fastfetch is a neofetch-like tool for fetching system information and displaying it prettily. It is written mainly in C, with performance and customizability in mind. This command installs fastfetch and configures from CTT's mybash repository. https://github.com/ChrisTitusTech/mybash - **Flatpak / Flathub**: Flatpak is a universal application sandbox for Linux that uses isolated packages from Flathub to prevent conflicts and system alterations, while alleviating dependency concerns. This command installs Flatpak and adds the Flathub repository - **Grub Theme**: Installs ChrisTitusTech's Top 5 Bootloader Themes script to allow for easy customization of GRUB.