{"id":582,"date":"2025-05-08T01:35:00","date_gmt":"2025-05-08T01:35:00","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=582"},"modified":"2025-05-08T01:35:00","modified_gmt":"2025-05-08T01:35:00","slug":"podman-tutorial-beginners","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=582","title":{"rendered":"Podman Tutorial For Beginners: Step by Step Guides"},"content":{"rendered":"<p>In this podman tutorial for beginners, I will walk you through step-by-step guides to get started with podman and explore all Podman functionalities.<\/p>\n<p>When we talk about containers, the default tool which comes to our mind is <a href=\"https:\/\/devopscube.com\/what-is-docker\/\" rel=\"noreferrer noopener\">Docker<\/a>. But there have been so many developments in container space after the inception of Docker, particularly on container security. And one of the projects which address the security concerns is Podman.<\/p>\n<p>Here is what you will learn from this guide.<\/p>\n<h2 id=\"what-is-podman\">What is Podman?<\/h2>\n<p><a href=\"https:\/\/podman.io\/?ref=devopscube.com\" rel=\"noreferrer noopener\">Podman<\/a> is an <a href=\"https:\/\/github.com\/opencontainers?ref=devopscube.com\" rel=\"noreferrer noopener\">OCI <\/a>compliant container management tool that offers similar features like Docker for managing containers.<\/p>\n<p>One of the best features of podman is its ability to <strong>run rootless containers<\/strong>. A rootless container is a concept of running and managing containers without root privileges (Normal user). From a security standpoint, rootless containers add an additional layer of security by not allowing root access even if the container gets compromised by an attacker. You can read about the benefits of rootless containers <a href=\"https:\/\/blog.aquasec.com\/rootless-containers-boosting-container-security?ref=devopscube.com\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note:<\/strong><\/b> Docker also supports rootless mode with some limitations. You can read about it <a href=\"https:\/\/docs.docker.com\/engine\/security\/rootless\/?ref=devopscube.com\" rel=\"noreferrer noopener\">here<\/a>.<\/div>\n<\/div>\n<p>Podman is also daemonless (unlike docker), meaning it doesn&#8217;t have a daemon and interacts directly with the runc (runs containers based on OCI specification). Toward the end of the article, I added the <strong>difference between Docker and Podman.<\/strong><\/p>\n<p>Also, let&#8217;s say there are two users in Linux. <strong>user-a<\/strong> and <strong>user-b<\/strong>. The containers created by <strong>user-a<\/strong> using podman cannot be modified by <strong>user-b<\/strong> and vice versa.<\/p>\n<p>Another interesting and advanced feature of podman is running containers in Pods. Similar to <a href=\"https:\/\/devopscube.com\/kubernetes-tutorials-beginners\/\" rel=\"noreferrer noopener\">Kubernetes<\/a> pods, you can create multi-container pods locally using Podman. You can export the podman pod as a Kubernetes manifest and use a Kubernetes pod manifest to deploy and podman pod.<\/p>\n<h2 id=\"podman-github-tutorial-repo\">Podman Github Tutorial Repo<\/h2>\n<p>I have created a <a href=\"https:\/\/github.com\/techiescamp\/podman?ref=devopscube.com\" rel=\"noreferrer noopener\">Podman Github repo <\/a>with a few examples. I will keep updating the repo on resources and examples.<\/p>\n<pre><code>git clone https:\/\/github.com\/techiescamp\/podman<\/code><\/pre>\n<p>The repo contains a Vagrantfile which you can use to learn and test podman. Podman and runc get installed when you bring up the <a href=\"https:\/\/devopscube.com\/vagrant-tutorial-beginners\/\" rel=\"noreferrer noopener\">vagrant VM<\/a>. It uses an ubuntu 24.04 base image.<\/p>\n<h2 id=\"installing-podman\">Installing Podman<\/h2>\n<p>Head over to the official <a href=\"https:\/\/podman.io\/getting-started\/installation?ref=devopscube.com\" rel=\"noreferrer noopener\">podman installation documentation<\/a>. Here you will find all installation commands for Windows, MAC and Linux flavors.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note<\/strong><\/b>: For Windows and Mac, podman needs a Virtual machine to deoploy containers.<\/div>\n<\/div>\n<p>I am using Ubuntu 24.04 for testing. You can use the following steps for Ubuntu 24.04.<\/p>\n<pre><code>sudo apt-get install runc -y\nsudo apt-get -y install podman<\/code><\/pre>\n<p>For CentOS 7,<\/p>\n<pre><code>sudo yum -y install podman<\/code><\/pre>\n<p>For MAC install Podaman and then initalize <a href=\"https:\/\/www.qemu.org\/?ref=devopscube.com\">QEMU<\/a> based virtual machine using the podman machine command.<\/p>\n<pre><code>brew install podman\npodman machine init\npodman machine start<\/code><\/pre>\n<p>After installation, verify the installation using the following command.<\/p>\n<pre><code>podman version<\/code><\/pre>\n<h2 id=\"podman-container-registry-configurations\">Podman Container Registry Configurations<\/h2>\n<p>By default, Podman is configured with two container registries.<\/p>\n<ol>\n<li><a href=\"https:\/\/quay.io\/?ref=devopscube.com\" rel=\"noreferrer noopener\">quay.io<\/a><\/li>\n<li><a href=\"https:\/\/hub.docker.com\/?ref=devopscube.com\" rel=\"noreferrer noopener\">docker.io<\/a><\/li>\n<\/ol>\n<p>You can find the default Podman container registry configuration in the following file.<\/p>\n<pre><code>\/etc\/containers\/registries.conf<\/code><\/pre>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/05\/image-31.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1829\" height=\"439\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/05\/image-31.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/05\/image-31.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/05\/image-31.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/05\/image-31.png 1829w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">By default, the <code spellcheck=\"false\" style=\"white-space: pre-wrap;\">unqualified-search-registries<\/code> field will be masked, so you need to unmask and add the registries such as <code spellcheck=\"false\" style=\"white-space: pre-wrap;\">docker.io<\/code> , <code spellcheck=\"false\" style=\"white-space: pre-wrap;\">quay.io<\/code>, etc.<\/p>\n<p>If you do not add the registries here, you need to give the full image name on the Dockerfile, for example, <code spellcheck=\"false\" style=\"white-space: pre-wrap;\">docker.io\/nginx:latest<\/code>, otherwise you will get an error: <code spellcheck=\"false\" style=\"white-space: pre-wrap;\">Error: creating build container: short-name \"nginx:latest\" did not resolve to an alias and no unqualified-search<\/code>.<\/div>\n<\/div>\n<p>You can add custom or private container registries to this configuration. For example, google container registry, AWS ECR, self-hosted private registries, etc.<\/p>\n<p>If you want to use other private container images from the registries, you can log in to the registry using <code>podman<\/code> command. For example, to login to the docker hub,<\/p>\n<pre><code>podman login docker.io<\/code><\/pre>\n<p>Once logged in, you will be able to pull the container images from the docker hub using <code>podman<\/code> command<\/p>\n<p>If you wish to have a different registry configuration for a specific user, you can create separate <code>registries.conf<\/code> in the user directory with the container registry information.<\/p>\n<pre><code>$HOME\/.config\/containers\/registries.conf<\/code><\/pre>\n<h2 id=\"podman-container-storage\">Podman Container Storage<\/h2>\n<p>Each system user has its own container storage. Meaning, if you try to pull images from different user logins, it pulls the image from the remote registry instead of the local image.<\/p>\n<p>For example,<\/p>\n<ol>\n<li>For <strong>root<\/strong> users, the containers are stored in <code>\/var\/lib\/containers\/storage<\/code> directory<\/li>\n<li>For other users, the containers are stored in  <code>$HOME\/.local\/share\/containers\/storage\/<\/code> directory<\/li>\n<\/ol>\n<h2 id=\"managing-containers-with-podman\">Managing Containers With Podman<\/h2>\n<p>You can manage containers the same way you work with docker. However, instead of the docker command, we will use podman as a command with flags similar to docker. Also, you can run the podman command with any user without sudo privileges.<\/p>\n<p>First, let&#8217;s try to pull an image. By default, podman searches for images in <strong>quay.io<\/strong> first and then in <strong>docker.io<\/strong>. If an image is not present in <strong>quay.io<\/strong>, podman searches in docker.io and pulls the image. So it is better to specify the full image name what the registry endpoint. For example,<\/p>\n<pre><code>podman pull docker.io\/nginx\npodman pull quay.io\/quay\/busybox<\/code><\/pre>\n<p>Let&#8217;s run an Nginx container from the dockerhub registry. The following command runs the Nginx container with <code>8080<\/code> host port mapping.<\/p>\n<pre><code>podman  run --name docker-nginx -p 8080:80 docker.io\/nginx<\/code><\/pre>\n<p>If you see, the above podman commands are equivalent to the docker command and flags.<\/p>\n<p>You cannot use ports below 1024 in rootless mode (Normal user mode). Because the normal user container namespace does have privileges to map those ports. If you want to map host ports less than 1024 using podman, you should run podman in detach mode as the root user or with sudo privileges as shown below.<\/p>\n<pre><code>sudo podman run -d --name docker-nginx -p 80:80 docker.io\/nginx<\/code><\/pre>\n<p>You can check the mapped port using the following command. <code>-l <\/code>flat returns the details for the latest container.<\/p>\n<pre><code>podman port -l<\/code><\/pre>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/05\/image-20250507-063009.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"942\" height=\"119\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/05\/image-20250507-063009.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/05\/image-20250507-063009.png 942w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>You can inspect the container using inspect command.<\/p>\n<pre><code>podman inspect -l<\/code><\/pre>\n<p>Other commands to stop, remove and delete containers work the same as docker commands.<\/p>\n<p>Few examples,<\/p>\n<pre><code>podman images\npodman ps\npodman ps -a\npodman stop &lt;container-name&gt;\npodman rm &lt;container-name&gt;<\/code><\/pre>\n<p>Run the help command to know about all the available podman commands.<\/p>\n<pre><code>podman --help<\/code><\/pre>\n<h2 id=\"building-container-image-with-podman\">Building Container Image With Podman<\/h2>\n<p>Let&#8217;s try <a href=\"https:\/\/devopscube.com\/build-docker-image\/\">building container image<\/a> of Nginx with a custom HTML file. I have the Dockerfile and HTML file in a GitHub repo.<\/p>\n<p>Let&#8217;s clone the repo and cd into the repo <strong>nginx-image<\/strong> directory.<\/p>\n<pre><code>git clone https:\/\/github.com\/scriptcamp\/podman.git\ncd podman\/nginx-image<\/code><\/pre>\n<p>Inside the <code>nginx-image<\/code> folder, you will see a <code>Dockerfile<\/code> and <code>index.html <\/code>file.<\/p>\n<p>Let&#8217;s build the container image using podman. The command is similar to the docker command.<\/p>\n<pre><code>podman build -t scriptcamp\/nginx .<\/code><\/pre>\n<p>When build this container image, the name will be <code>localhost\/scriptcamp\/nginx<\/code>, so before pushing it into the registry, we need to tag the image with our repo name.<\/p>\n<pre><code>podman tag localhost\/scriptcamp\/nginx:latest docker.io\/scriptcamp\/nginx:latest<\/code><\/pre>\n<p>Now, let&#8217;s push the image to the container registry. Ensure you are logged in to the container registry to push the image. Here I a using dockerhub.<\/p>\n<pre><code>podman push docker.io\/scriptcamp\/nginx:latest<\/code><\/pre>\n<h2 id=\"creating-pod-with-podman\">Creating Pod With Podman<\/h2>\n<p>In this section, we will learn how to create a pod with Podman. One of the advanced features of Podaman is its ability to create pods similar to Kubernetes pods. A pod is a unit where you can have one or more containers.<\/p>\n<p>Here is what you can do.<\/p>\n<ol>\n<li><strong>Create an empty pod: <\/strong>When you create an empty pod, Podman assigns an infra container <em>k8s.gcr.io\/pause<\/em> to hold the namespace and allow communication to other containers in the pod.<\/li>\n<li>You can add and remove containers in a pod.<\/li>\n<li>You can create a full application stack in a pod.<\/li>\n<li>You can start and stop containers selectively inside a pod.<\/li>\n<\/ol>\n<p>Now lets, look at the examples.<\/p>\n<p>To know all the available podman pod commands, just run the help command.<\/p>\n<pre><code>podman pod --help<\/code><\/pre>\n<h3 id=\"create-an-empty-pod\">Create an Empty Pod<\/h3>\n<p>Let&#8217;s create an empty pod. If you don&#8217;t specify the <code>--name<\/code> flag, podman will create a pod with a random name.<\/p>\n<pre><code>podman pod create --name demo-pod<\/code><\/pre>\n<p>Let&#8217;s list the created pod.<\/p>\n<pre><code>podman pod ls<\/code><\/pre>\n<p>The following command lists all the containers in the pod. For empty pods, there will be a <code>k8s.gcr.io\/pause<\/code> container added to it.<\/p>\n<pre><code>podman ps -a --pod<\/code><\/pre>\n<h3 id=\"add-containers-to-podman-pod\">Add containers to Podman Pod<\/h3>\n<p>Let&#8217;s add an Nginx container to the empty pod. If you list the containers after running the following command, you will see the Nginx container added to the <code>demo-pod<\/code><\/p>\n<pre><code>podman run -dt --pod demo-pod  nginx<\/code><\/pre>\n<h3 id=\"start-stop-and-remove-containers-inside-podman-pod\">Start, Stop and Remove containers inside Podman Pod<\/h3>\n<p>You can start, stops, and remove containers from the podman pod using the same commands you use to remove containers with their ids.<\/p>\n<p>First list the containers in the pod using the podman command and using the following commands with the container Ids.<\/p>\n<pre><code>podman start &lt;continer-id&gt;\npodman stop &lt;continer-id&gt;\npodman rm &lt;continer-id&gt;<\/code><\/pre>\n<h3 id=\"create-pod-with-containers\">Create Pod With Containers<\/h3>\n<p>We can create a pod and add containers with a single command. Let&#8217;s create a pod with an Nginx container with host port mapping for <code>8080<\/code>.<\/p>\n<pre><code>podman run -dt --pod new:frontend -p 8080:80 nginx<\/code><\/pre>\n<p>If you access port 8080 on the VM&#8217;s IP, you should be able to see the Nginx homepage.<\/p>\n<h3 id=\"start-stop-and-delete-pod\">Start, Stop and Delete Pod<\/h3>\n<p>You can pick and stop individual containers inside the pod using the container id\/name or you can stop all the containers at once using the following command.<\/p>\n<pre><code>podman pod stop &lt;podname&gt;\npodman pod start &lt;podname&gt;<\/code><\/pre>\n<p>To remove a pod, first, stop all the containers in the pod and then run,<\/p>\n<pre><code>podman pod rm &lt;podname&gt;<\/code><\/pre>\n<p>Or you can remove the pod forcefully without stopping the containers using <code>-f <\/code>flag<\/p>\n<pre><code>podman pod rm -f &lt;pod-name&gt;<\/code><\/pre>\n<h3 id=\"multi-container-application-stack\">Multi Container Application Stack<\/h3>\n<p>You can have a multi-container application stack in a single podman pod. This helps in developing and testing applications locally.<\/p>\n<p>For example, if you have an application and database, you can have an app and DB container in the same pod. You can destroy and bring up the stack any time you need. Something similar to docker-compose.<\/p>\n<p>Both app and DB containers can talk to each other using localhost. I will cover this implementation separately in a blog.<\/p>\n<h2 id=\"generate-kubernetes-yaml-from-podman-pod-definitions\">Generate Kubernetes YAML from Podman Pod Definitions<\/h2>\n<p>Another interesting feature of Podman is you can generate Kubernetes pod YAMLs from podman pods. This is a working feature but is still under development.<\/p>\n<p>First, let&#8217;s deploy a pod named webserver with an Nginx container.<\/p>\n<pre><code>podman run -dt --pod new:webserver -p 8080:80 nginx<\/code><\/pre>\n<p>Now to generate the Kubernetes YAML for the podman pod, we will use the <code>generate kube<\/code> flag with the pod name as shown below.<\/p>\n<pre><code>podman generate kube webserver<\/code><\/pre>\n<p>You can direct the generated YAML to a file with redirection.<\/p>\n<pre><code>podman generate kube webserver &gt;&gt; webserver.yaml<\/code><\/pre>\n<h2 id=\"create-podman-pod-from-yaml\">Create Podman Pod from YAML<\/h2>\n<p>If you have a pod YAML file, you can import and run it as a Podman pod using the  <code>play kube<\/code> flag.<\/p>\n<p>For example, we will use the <code>webserver.yaml<\/code> generated in the last section to run the pod. First, we need to remove the existing webserver pod.<\/p>\n<pre><code>podman pod rm -f webserver<\/code><\/pre>\n<p>Let&#8217;s import the pod using <code>webserver.yaml<\/code><\/p>\n<pre><code>podman play kube webserver.yaml<\/code><\/pre>\n<p>Now, let&#8217;s try importing a Kubernetes YAML. Save the following Kubernetes manifest  as <code>nginx.yaml<\/code><\/p>\n<pre><code>apiVersion: v1\nkind: Pod\nmetadata:\n  name: nginx\nspec:\n  containers:\n  - name: webserver\n    image: docker.io\/nginx:latest\n    ports:\n    - containerPort: 80<\/code><\/pre>\n<p>Let&#8217;s import it as a podman pod.<\/p>\n<pre><code>podman play kube nginx.yaml<\/code><\/pre>\n<p>Now, if you list the pods, you can see a running Nginx pod.<\/p>\n<h2 id=\"podman-desktop\">Podman Desktop<\/h2>\n<p>Podman Desktop is a GUI tools for managing podman contianers. It is available for Windows, MAC and Linux Systems.<\/p>\n<p>You can download and install <a href=\"https:\/\/podman-desktop.io\/?ref=devopscube.com\" rel=\"noreferrer noopener\">Podman Desktop from here<\/a>.<\/p>\n<h2 id=\"docker-vs-podman\">Docker Vs Podman<\/h2>\n<p>If you are wondering how Podman is different from docker, the following table helps you with some key differences.<\/p>\n<p><!--kg-card-begin: html--><\/p>\n<table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>Podman<\/th>\n<th>Docker<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Podman is Daemonless<\/td>\n<td>Docker has a daemon (containerd&nbsp;). The docker CLI interacts with the daemon to manage containers.<\/td>\n<\/tr>\n<tr>\n<td>Podman interacts with the Linux kernel directly through runc<\/td>\n<td>Docker daemon owns all the child processes of running containers<\/td>\n<\/tr>\n<tr>\n<td>Podman can deploy pods with multiple containers. The same pod manifest can be used in Kubernetes. Also, you can deploy a Kubernetes pod manifest as a Podman pod.<\/td>\n<td>There is no concept of a pod in Docker<\/td>\n<\/tr>\n<tr>\n<td>Can run rootless containers without any additional configurations. You can run containers with root or non-privileged users.<\/td>\n<td>Docker rootless mode requires additional configurations.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!--kg-card-end: html--><\/p>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-podman-differences-1.png\" class=\"kg-image\" alt=\"podman tutorial: docker vs podman\" loading=\"lazy\" width=\"1170\" height=\"606\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-podman-differences-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/docker-podman-differences-1.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-podman-differences-1.png 1170w\" sizes=\"auto, (min-width: 720px) 720px\"><figcaption><span style=\"white-space: pre-wrap;\">Click to view in HD<\/span><\/figcaption><\/figure>\n<h2 id=\"podman-vs-buildah\">Podman Vs Buildah<\/h2>\n<p>When you start learning or researching about podman, you will read about <a href=\"https:\/\/buildah.io\/?ref=devopscube.com\" rel=\"noreferrer noopener\">Buildah<\/a>. Both projects were initially created by Redhat.<\/p>\n<p>You might get confused with Podman &amp; Buildah projects. Podman uses Buildah under the cover for run and build operations. Read this official podman blog that explains the difference between<a href=\"https:\/\/podman.io\/blogs\/2018\/10\/31\/podman-buildah-relationship.html?ref=devopscube.com\" rel=\"noreferrer noopener\"> Podman and Buildah<\/a>.<\/p>\n<h2 id=\"podman-errors-issues\">Podman Errors &amp; Issues<\/h2>\n<p>Following are some of the errors and issues I faced while doing hands-on with Podman.<\/p>\n<h3 id=\"port-mapping-error\">Port Mapping Error<\/h3>\n<p>If you try to map privileged ports you might get the following error. Always use a nonprivileged port if you want to run Podman as a non-root user.<\/p>\n<pre><code>Error: error from slirp4netns while setting up port redirection: map[desc:bad request: add_hostfwd: slirp_add_hostfwd failed]<\/code><\/pre>\n<p>If you don&#8217;t have <code>runc<\/code> installed, you might get the following error.<\/p>\n<pre><code> Error: default OCI runtime \"runc\" not found: invalid argument<\/code><\/pre>\n<h3 id=\"image-errors\">Image Errors<\/h3>\n<p>If you don&#8217;t specify the correct image name, Podman will throw the following error.<\/p>\n<pre><code>Trying to pull quay.io\/busybox...\n  error parsing HTTP 404 response body: invalid character '&lt;' looking for beginning of value: \"&lt;!DOCTYPE HTML PUBLIC \\\"-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN\\\"&gt;\\n&lt;title&gt;404 Not Found&lt;\/title&gt;\\n&lt;h1&gt;Not Found&lt;\/h1&gt;\\n&lt;p&gt;The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.&lt;\/p&gt;\\n\"<\/code><\/pre>\n<p>It normally happens with quay.io because, unlike docker, for quay.io , you should specify the image name correctly.<\/p>\n<p>For example, <code>podman pull busybox<\/code>, will throw the error. But, <code>podman pull quay\/busybox<\/code> works without any error.<\/p>\n<h3 id=\"pod-errors\">Pod Errors<\/h3>\n<p>If you try to add a container with ports that were not added during the pod creation, you will get the following error.<\/p>\n<pre><code>Error: invalid config provided: published or exposed ports must be defined when the pod is created: network cannot be configured when it is shared with a pod<\/code><\/pre>\n<p>If you try to delete a pod with running containers, you will get the following error. First, you need to stop all the containers and then delete the pod.<\/p>\n<pre><code>Error: pod 9e31de31950664702f21 has containers that are not ready to be removed: cannot remove container 3d10007e844a5aea3c7805fb0ee986b0b4c2cedd66c0996d0bff9f53ba1c0b57 as it is running - running or paused containers cannot be removed without force: container state improper<\/code><\/pre>\n<p>Sometimes you might deploy containers using a specific user and if you try to list the containers with a different user or with sudo, you will get the following error.<\/p>\n<pre><code>Error: no pod with name or ID webserver found: no such pod<\/code><\/pre>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>In this <strong>podman tutorial<\/strong>, I have explained all the basic concepts to get started with managing containers using Podman.<\/p>\n<p>If you are already using Docker desktop extensive on mac and windows, podman is not something that can replace it. However, podman comes with its own benefits.<\/p>\n<p>But definitely, it&#8217;s time to stop thinking of Docker as the de-facto standard when it comes to containers.<\/p>\n<p>You might be using docker and looking for another tooling around container management or just heard about podman. Either way, let me know your thoughts in the comments below.<\/p>\n<p>Also, if you are learning Kubernetes, you can check out my <a href=\"https:\/\/devopscube.com\/kubernetes-tutorials-beginners\/\" rel=\"noreferrer noopener\">Kubernetes tutorials for beginners<\/a>.<\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/podman-tutorial-beginners\/\" target=\"_blank\" rel=\"noopener noreferrer\">Podman Tutorial For Beginners: Step by Step Guides \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/podman-tutorial-beginners\/<\/p>\n","protected":false},"author":1,"featured_media":583,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-582","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=582"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/582\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/583"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}