Allgemein

Want an easy way to manage Podman containers? Here it is.

Want an easy way to manage Podman containers? Here it is.

You’ve heard of Docker Desktop, right?

Of course you have.

Docker Desktop is a user-friendly GUI app that simplifies managing Docker containers. With this point-and-click tool, you can click your way to deploying all the containers you want. You can even manage Kubernetes with Docker Desktop.

But what if you’ve migrated from Docker to Podman? What do you do? Are you limited to the command line? What about working with pods, images, volumes, and K8s?

Well, if you’ve made the switch, you’re in luck because there’s a wonderful GUI app for Podman, aptly named Podman Desktop.

Podman Desktop features a handy dashboard that includes tips on using Podman, management for nearly every aspect of your containers, Kubernetes support, extensions, Kind support (a K8s utility for running local clusters using single-container “nodes”), Compose support, proxy settings, registry configuration, authentication provider support, CLI tools, and even experimental features (when they become available).

Podman Desktop is free to use and is available for Linux, macOS, and Windows.

Let me show you how to install and use this helpful app.

Installing Podman Desktop

If you’re installing Podman Desktop on either macOS or Windows, it’s just a matter of downloading the associated installer file, double-clicking it, and walking through the install wizard. Since the Linux installation isn’t quite that easy (although it’s not hard), I’ll show you how to install it on the open source OS.

Installing Podman Desktop on Linux

Podman Desktop is installable as a Flatpak app, or you can run it from a binary file. I’m going to show you how to successfully install the app via Flatpak, because that’s not only the easiest method, but you also don’t have to worry about starting the app from the command line every time.

To install Podman Desktop via Flatpak, you will need a Linux distribution that supports flatpak (which is most of them). To make sure you have Flatpak installed, issue the command:

which flatpak

The output should be /usr/bin/flatpak. If you receive no output, it means Flatpak isn’t installed. You can install Flatpak with one of the following commands:

  • On Ubuntu/Debian-based distributions – sudo apt-get install flatpak -y
  • On Fedora-based distributions – sudo dnf install flatpak -y
  • On Arch-based distributions – sudo pacman -S flatpak

Once you’ve taken care of the installation, you’ll need to add the Flathub repository with the command:

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Finally, install Podman Desktop with the command:

flatpak install flathub io.podman_desktop.PodmanDesktop

You should now find an entry for Podman Desktop in your desktop menu. Start the app and walk through the straightforward onboarding wizard.

Using Podman Desktop

From the Podman Desktop Dashboard (Figure 1), you can either scroll through the feature explorer or click one of the features in the left sidebar.

Figure 1: The Podman Desktop dashboard is very cleanly designed.

Let’s deploy a container.

Click Containers in the left sidebar. In the resulting window, click “Start your first container” (Figure 2).

Figure 2: You can either point and click or run the sample command to launch your first container.

What you’ve just done is create the “Hello” container. It should automatically be listed in the All tab (Figure 3).

Figure 3: Huzzah, you’ve created the “Hello” app.

From the listing, click the Run button (the right-pointing arrow), to deploy the container.

Of course, the Hello app isn’t much help. Let’s deploy something a bit more helpful.

Click on the Images entry in the left sidebar. On the resulting page (Figure 4), click Pull.

Figure 4: We’re about to pull an image for use in Podman Desktop.

In the Image to Pull field (Figure 5), type the name of the image you want to pull. Let’s pull the Homepage image.

Figure 5: We’re going to deploy the Homepage app.

Click Pull Image and wait for the task to finish.

Once the image is ready, click Done and then click Containers in the left sidebar.

Click Create (in the upper right-hand corner) and, when prompted, click Existing Image.

From the list of images (Figure 6), select the Homepage image you just pulled.

Figure 6: The homepage:latest image should be available.

Click Run Image.

In the resulting page, fill out the necessary information. For example, you’re going to want to make sure to create a volume. Create a directory on host host with the command:

mkdir -p ~/docker/homepage

NOTE: If you’re using macOS or Windows, make sure to adjust the above command as needed.

The configuration should look something like that in Figure 7.

Figure 7: Our Homepage container is almost ready to launch.

After you finish your container setup, click Start Container. Give the container time to spin up, and you should then be able to access it via the host IP address and configured port.

It’s that easy.

You can then select the container and the Summary, Logs, Inspect, Kube, Terminal, or Tty tabs to see what’s going on or troubleshoot.

And there you go, you’ve just installed Podman Desktop and launched your first container. Keep digging around in this app to see what it can do.

The post Want an easy way to manage Podman containers? Here it is. appeared first on The New Stack.