« Previous 1 2 3 4 Next »
Simplify your migration from Docker to Podman
Contained
Managing Containers
What Podman Desktop does not tell you is which container images are available. To find out, you need to use a podman search
term in the terminal window. If you want to set up an Nginx web server, for example, type the command,
podman search nginx
which searches for matches in all available repositories. In the resulting output, select the appropriate package and download it with the image manager pull
function. The repositories are stored in the /etc/containers/repositories.conf
configuration file.
Podman Desktop facilitates everyday use. Clicking on Manage registries shows which repositories are available. If you want to add your organization's own internal registries, select Add registry , enter the URL with the credentials, and press Login to access the repository.
Verifying that the registry setup is working properly is important. If you want to set up a Podman-based WordPress installation, for example, you would download the supplied image and generate a container based on this image. To enable access to the web-based environment, you have to specify the port mappings. After launching the environment, you access the blog system by selecting Open Browser .
Working with Images
To make migrating from Docker to Podman as simple as possible, the developers have implemented an import function that facilitates switching to or evaluating Podman.
To try it out, open the Images manager, click on the Import button, add the desired image, and launch the process by pressing Import Containers . As the button name suggests, you can import several images at once.
If you want to import an existing container, you need to save it first. In the case of a Docker container, run the command:
docker export <your_container> <your_container_export>.tar
You can also use the import function to transfer a Podman container to a third-party system. To do so, first save the container with the command:
podman save <your_container> <your_container_export>.tar
Things are even easier with Podman Desktop. You just need to run the export
command in the container manager's Actions column. During the import process, make sure you only use lowercase letters for the image name; otherwise, Podman Desktop displays an error message. After importing, you will find the imported archive in the Podman image manager.
Docker Compose
Docker Compose allows you to generate multi-tier applications, such as those found a multitude of times in typical infrastructures. The orchestration tool lets you define different containers, which you can link to and run on any Docker host. The good news for Podman Desktop users is that the Podman environment also supports the Compose specification [4].
Before you can use Compose in Podman Desktop, you need to install the Compose Engine. If you did not enable Compose during the Podman Desktop installation, do so now by going to the Setting | Resources
menu item, clicking Setup
in the Compose section, and following the instructions. The Compose reference implementation is located in your PATH
, which explains why you can display the Compose version in the terminal window:
docker-compose version
To verify the installation, you want to make sure Podman has found the same Compose version:
podman compose version
To use Compose, you need a Compose file (e.g., compose.yaml
); to execute it, access the terminal window:
podman compose --file compose.yaml up --detach
Compose then starts the specified containers and services. The following labels are added to the various resources:
- Container name:
com.docker.compose.project
- Service ID:
com.docker.compose.service
Podman Desktop recognizes the Compose label and displays a matching icon to visualize the container group. A (compose)
suffix is also added to the group name.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)