Upgrade Podman

#!/bin/bash

# Define color variables
GREEN='\033[0;32m'
NC='\033[0m' # No Color

# Function to print steps in green
print_step() {
    echo -e "${GREEN}$1${NC}"
}

# Start the script
print_step "Starting the installation of Podman version > 3.4.0"

# Step 1: Update the system
print_step "Updating the system..."
sudo apt-get update -y
sudo apt-get upgrade -y

# Step 2: Install Podman
print_step "Installing Podman..."
. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$VERSION_ID/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
curl -L "http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$VERSION_ID/Release.key" | sudo apt-key add -
sudo apt-get update -y
sudo apt-get -y install podman

# Step 3: Verify Podman version
print_step "Verifying Podman version..."
podman_version=$(podman --version)
print_step "Podman version installed: $podman_version"

print_step "Podman installation completed successfully!"

Last updated