UbuntuUbuntu Based

How To Install Podman Desktop on Ubuntu 24.04 LTS

Install Podman Desktop on Ubuntu 24.04

In this tutorial, we will show you how to install Podman Desktop on Ubuntu 24.04 LTS. In today’s containerized development environment, having reliable tools to manage containers is essential for developers and system administrators alike. Podman Desktop emerges as a powerful graphical user interface tool for managing containers, offering a secure, daemonless alternative to traditional container management solutions. Ubuntu 24.04 LTS (Noble Numbat), the latest long-term support release from Canonical, provides an excellent foundation for running container technologies like Podman Desktop.

This comprehensive guide walks you through the complete process of installing Podman Desktop on Ubuntu 24.04 LTS, from understanding the technology to troubleshooting common issues. Whether you’re a seasoned Linux professional or just getting started with containerization, this tutorial provides all the necessary information to successfully deploy and configure Podman Desktop on your Ubuntu system.

Understanding Podman Technology

Podman stands out in the containerization landscape due to its unique architecture and security-focused approach. Before diving into installation, it’s important to understand what makes Podman different from alternatives like Docker.

Podman is an open-source container management tool that allows you to develop, manage, and run Open Container Initiative (OCI) containers. Unlike Docker, Podman doesn’t rely on a background daemon process, making it a “daemonless” container engine. This architecture provides several advantages:

  • Enhanced security: Without a persistent root-privileged service, Podman reduces potential attack surfaces.
  • Rootless containers: Containers can run without requiring root privileges, improving security posture.
  • Resource efficiency: The daemonless design means resources are only utilized when needed.
  • Docker compatibility: Podman provides a command-line interface (CLI) that’s compatible with Docker commands.

Podman Desktop extends these capabilities with a user-friendly graphical interface, making container management more accessible. It provides integration with multiple container technologies including Podman, Docker, Lima, OpenShift Local, and Kind. The seamless Kubernetes integration in Podman Desktop allows developers to focus more on code development rather than container management complexities.

Prerequisites for Installation

Before proceeding with the installation, ensure your Ubuntu 24.04 LTS system meets the following requirements:

  • System resources: Minimum 1GB RAM (2GB recommended)
  • Disk space: At least 1GB free storage space
  • User permissions: Access to a user account with sudo privileges
  • Network access: An active internet connection for downloading packages
  • Terminal access: Ability to open and use the terminal (Ctrl+Alt+T)

If you’re planning to use Podman Desktop in a production environment, consider setting up a Vultr Container Registry or similar service to store your container images securely.

Pre-Installation System Preparation

A clean and updated system provides the best foundation for installing new software. Follow these steps to prepare your Ubuntu 24.04 system:

  1. Open your terminal using Ctrl+Alt+T or search for “Terminal” in the Activities overview.
  2. Update your system package index and upgrade existing packages:
    sudo apt update && sudo apt upgrade -y
  3. Install required dependencies:
    sudo apt install -y software-properties-common
  4. Check for existing container engines that might conflict with Podman:
    dpkg -l | grep -E 'docker|container|podman'

While Podman can coexist with Docker, it’s good practice to be aware of existing container technologies on your system.

Installing Podman Engine

Podman Desktop relies on the Podman engine to function properly. Let’s install the engine first:

  1. Install the Podman package from the Ubuntu repositories:
    sudo apt install podman -y
  2. Verify the installation was successful:
    podman --version

    You should see output similar to: podman version 4.9.3.

  3. Start and enable the Podman socket service:
    sudo systemctl start podman.socket
    sudo systemctl enable podman.socket
  4. Confirm the service is running correctly:
    sudo systemctl status podman.socket

    You should see “active (running)” in the output, indicating that the Podman service is operational.

  5. Get detailed information about your Podman installation:
    podman info

    This command displays comprehensive information about your Podman installation, including storage configuration and registries.

Installing Podman Desktop via Flatpak

Podman Desktop is most conveniently installed through Flatpak on Ubuntu 24.04. Flatpak provides a sandboxed environment for applications and simplifies updates and maintenance.

  1. If Flatpak isn’t already installed on your system, install it:
    sudo apt install flatpak -y
  2. Add the Flathub repository if it isn’t already configured:
    flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
  3. Install Podman Desktop:
    flatpak install --user flathub io.podman_desktop.PodmanDesktop

    When prompted, type ‘y’ to confirm the installation and dependencies.

  4. After installation completes, you may need to log out and log back in for your system to recognize the newly installed Flatpak application.
  5. Launch Podman Desktop:
    flatpak run io.podman_desktop.PodmanDesktop

    Alternatively, you can find and launch Podman Desktop from your Applications menu after logging back in.

First-Time Configuration

After installing Podman Desktop, it’s time to configure it for optimal use. Here’s how to get started:

  1. Launch Podman Desktop from your Applications menu or through the terminal:
    flatpak run io.podman_desktop.PodmanDesktop
  2. When Podman Desktop opens for the first time, it will automatically search for container engines on your system, including the Podman engine we installed earlier.
  3. If Podman Desktop doesn’t automatically detect your Podman installation, you may need to configure it manually through the Settings panel.
  4. Navigate to Settings > Resources to ensure your Podman machine is properly detected and running.
  5. Configure container registries through the interface or by editing the registry configuration files directly. Default registries include docker.io, quay.io, and registry.fedoraproject.org.
  6. Adjust user preferences like theme (light/dark mode), notification settings, and resource allocation for containers based on your system capabilities.

Proper first-time configuration ensures smooth operation and prevents common issues that might arise from misconfigured settings.

Working with Container Images

With Podman Desktop properly installed and configured, you can start working with container images:

  1. Pull your first container image using the Podman Desktop interface or via terminal:
    podman pull ubuntu:latest

    This downloads the latest Ubuntu container image from the default registry.

  2. View downloaded images through the Podman Desktop interface or with:
    podman images

    This command lists all images currently stored on your system.

  3. Search for images from different registries using the search functionality in Podman Desktop.
  4. Build custom container images using Dockerfiles directly through Podman Desktop or via the command line:
    podman build -t my-custom-image:latest .
  5. Push images to registries for sharing or deployment:
    podman push my-custom-image:latest quay.io/myusername/my-custom-image:latest

Remember to tag your images properly when working with multiple versions or registries. This helps maintain organization and makes it easier to track changes across different image iterations.

Creating and Managing Containers

Podman Desktop simplifies container management with its intuitive interface:

  1. Create a new container from an image by clicking on the “Create container” button in the Podman Desktop interface.
  2. Alternatively, use the command line:
    podman create --name my_ubuntu_container ubuntu:latest

    This creates a container named my_ubuntu_container using the ubuntu:latest image.

  3. Start the container:
    podman start my_ubuntu_container
  4. Access the container shell:
    podman exec -it my_ubuntu_container bash
  5. Stop a running container:
    podman stop my_ubuntu_container

The Podman Desktop interface provides easy access to container logs, resource usage statistics, and health status. You can monitor CPU, memory, and network usage without having to use complex command-line tools.

Container resource limits can be configured through the interface or by using command-line flags:

podman run --memory="512m" --cpus=2 -d nginx

This limits the container to 512MB of memory and 2 CPU cores.

Advanced Features and Integrations

Podman Desktop offers several advanced features that make container management and Kubernetes workflows more streamlined:

Kubernetes Integration

Podman Desktop comes built with Kubernetes at its core, allowing you to:

  1. Set up local Kubernetes clusters using Kind or Minikube directly from the interface.
  2. Manage Kubernetes pods, services, and deployments through the graphical interface.
  3. Bridge to remote Kubernetes environments for testing applications before production deployment.

Development Workflows

Podman Desktop enhances development workflows through:

  1. Faster iteration cycles with local container development.
  2. Extensions that allow customization of the development environment.
  3. Learning resources for container and Kubernetes concepts, helping developers grow their skills progressively.

Enterprise Features

For enterprise environments, Podman Desktop offers:

  1. VPN and proxy support for secure networking configurations.
  2. Multi-architecture support for building and running containers across different hardware platforms.
  3. GPU acceleration enabling AI development workflows directly in containers.

Systemd Integration

Podman provides robust integration with systemd, allowing containers to be managed as system services:

  1. Generate systemd unit files for your containers:
    podman generate systemd --new --name my_container
  2. Save the generated file to the appropriate systemd directory:
    podman generate systemd --new --name my_container > ~/.config/systemd/user/container-my_container.service
  3. Enable and start the service:
    systemctl --user enable container-my_container.service
    systemctl --user start container-my_container.service
  4. For system-wide services (requiring root):
    sudo podman generate systemd --new --name my_container > /etc/systemd/system/container-my_container.service
    sudo systemctl enable container-my_container.service
    sudo systemctl start container-my_container.service

This integration ensures your containers reliably start after system reboots and can be managed using standard systemd commands like systemctl start, systemctl stop, and systemctl status.

Troubleshooting Common Issues

Even with a smooth installation process, you might encounter issues with Podman Desktop. Here are solutions to common problems:

Podman Desktop Cannot Find Podman Installation

  1. Verify Podman is installed correctly:
    podman version
  2. Restart Podman Desktop after each troubleshooting step.
  3. Update Podman to the latest version:
    sudo apt update && sudo apt upgrade podman
  4. If problems persist, reinstall Podman:
    sudo apt remove podman -y && sudo apt install podman -y

Container Listing Issues

If Podman Desktop displays “No containers” despite having running containers:

  1. Stop and restart Podman Desktop.
  2. Restart the Podman machine:
    podman machine stop
    podman machine start
  3. If issues persist, verify container status via command line:
    podman ps -a

Docker Compatibility Mode Warning

You might see a warning about Docker compatibility mode:

⚠️ Docker Socket Compatibility: Podman is not emulating the default Docker socket path: ‘/var/run/docker.sock’

To resolve this:

  1. Stop Docker Desktop if it’s running.
  2. On macOS systems, run:
    sudo podman-mac-helper install
  3. Restart the Podman machine to recreate and activate the default Docker socket path.

Connection Issues

If you experience connection problems between the Desktop UI and engine:

  1. Check the Podman socket status:
    systemctl status podman.socket
  2. Ensure the socket is active and running.
  3. Restart the Podman socket:
    sudo systemctl restart podman.socket

Congratulations! You have successfully installed Podman Desktop. Thanks for using this tutorial for installing the Podman desktop on your Ubuntu 24.04 LTS Linux system. For additional help or useful information, we recommend you check the official Podman Desktop website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button