{"id":266730,"date":"2021-06-04T17:00:31","date_gmt":"2021-06-04T14:00:31","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/"},"modified":"2021-06-04T17:00:31","modified_gmt":"2021-06-04T14:00:31","slug":"what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/","title":{"rendered":"#What Is Podman and How Does It Differ from Docker? \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6adefc13c7523\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6adefc13c7523\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Whats_a_Runtime\" >What\u2019s a Runtime?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#How_to_Install_Podman\" >How to Install Podman<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Working_with_Containers_and_Images\" >Working with Containers and Images<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Whats_Different_about_Podman\" >What\u2019s Different about Podman?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Pods\" >Pods<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Rootless_Containers\" >Rootless Containers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-podman-and-how-does-it-differ-from-docker-cloudsavvy-it\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#What Is Podman and How Does It Differ from Docker? \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-11577\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/05\/c4b5f09b.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Graphic showing the Podman logo\" width=\"1602\" height=\"902\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Podman is a container engine that\u2019s compatible with the OCI Containers specification. Podman <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developers.redhat.com\/blog\/2018\/08\/29\/intro-to-podman\">is part of<\/a> RedHat Linux, but can also be installed on other distributions.<\/p>\n<p>As it\u2019s OCI-compliant, Podman can be used as a drop-in replacement for the better-known Docker runtime. Most Docker commands can be directly translated to Podman commands.<\/p>\n<p>Here\u2019s a look at how the two runtimes stack up.<\/p>\n<h2 id=\"whats-a-runtime\"><span class=\"ez-toc-section\" id=\"Whats_a_Runtime\"><\/span>What\u2019s a Runtime?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To a lot of people, a \u201ccontainer\u201d is still a \u201cDocker container.\u201d This isn\u2019t an accurate representation of the current container ecosystem. Docker produces OCI container images, which can be used with other compatible runtimes. Kubernetes is one example, while Podman is another.<\/p>\n<p>As a consequence, Podman and Docker have overl<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>ing core functionality. Both produce images that the other can use to run containers. The two runtimes then add their own specialisms on top of the base containerization features.<\/p>\n<h2 id=\"how-to-install-podman\"><span class=\"ez-toc-section\" id=\"How_to_Install_Podman\"><\/span>How to Install Podman<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you\u2019re using RedHat Linux, Podman\u2019s in the <code>extras<\/code> repository. Use <code>subscription-manager<\/code> to add the repository. You\u2019ll then be able to use <code>yum<\/code> to install Podman.<\/p>\n<pre>su -&#13;\nsubscription-manager repos --enable rhel-7-server-extras-beta-rpms&#13;\nyum -y install podman<\/pre>\n<p>Most other popular Linux distributions also include Podman in their default repositories. You can <code>apt install podman<\/code>, <code>dnf install podman<\/code> or <code>pacman -S podman<\/code> to get it installed.<\/p>\n<h2 id=\"working-with-containers-and-images\"><span class=\"ez-toc-section\" id=\"Working_with_Containers_and_Images\"><\/span>Working with Containers and Images<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Podman\u2019s CLI is deliberately aligned with Docker\u2019s. That means that you can use familiar Docker commands to interact with Podman containers:<\/p>\n<pre>podman pull my-image:latest&#13;\n&#13;\npodman run my-image:latest --name my-container&#13;\n&#13;\npodman ps&#13;\n&#13;\npodman rm my-container<\/pre>\n<p>Podman should be instantly familiar to Docker users. You could alias <code>docker<\/code> to <code>podman<\/code> and not notice a difference in day-to-day use. Of course, not every feature is available, though\u2014trying to use Docker Swarm commands will throw an error, as Podman doesn\u2019t have anything equivalent to Swarm.<\/p>\n<h2 id=\"whats-different-about-podman\"><span class=\"ez-toc-section\" id=\"Whats_Different_about_Podman\"><\/span>What\u2019s Different about Podman?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>While it feels similar to Docker, Podman has a few distinguishing differences. First and arguably most significant is its architecture. Podman is <em>daemon-less<\/em>\u2014there\u2019s no long-living process managing your containers.<\/p>\n<p>When you run a <code>podman<\/code> command, you\u2019re interfacing directly with the process that\u2019s starting your containers and fetching your images. Docker\u2019s CLI is dependent on a connection to the Docker daemon. The CLI sends commands to the daemon, and the daemon then acts on them to create containers.<\/p>\n<p>Podman\u2019s model helps to address some of the concerns around Docker security. The lack of a daemon considerably reduces the container attack surface. If you need remote access, Podman exposes a REST API that <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.podman.io\/en\/latest\/_static\/api.html\">lets you interact<\/a> with all supported resource types.<\/p>\n<h2 id=\"pods\"><span class=\"ez-toc-section\" id=\"Pods\"><\/span>Pods<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Podman comes with unique features that Docker lacks entirely. In Podman, containers can form \u201cpods\u201d that operate together. It\u2019s similar to the Kubernetes Pod concept.<\/p>\n<p>To create a Pod, use the <code>pod create<\/code> command:<\/p>\n<pre>podman pod create --name my-pod<\/pre>\n<p>Containers are added to Pods by including the <code>--pod<\/code> flag with <code>podman run<\/code>:<\/p>\n<pre>podman run --pod my-pod --name image-1 my-image:latest&#13;\npodman run --pod my-pod --name image-2 another-image:latest<\/pre>\n<p>Containers in the Pod can be managed <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developers.redhat.com\/blog\/2019\/01\/15\/podman-managing-containers-pods\">in aggregate by<\/a> using <code>podman pod<\/code> commands:<\/p>\n<pre>podman kill my-pod      # Kill all containers&#13;\npodman restart my-pod   # Restart all containers&#13;\npodman stop my-pod      # Stop all containers<\/pre>\n<p>The Pod concept is powerful, as it lets you manage multiple containers in aggregate. You can create app containers, such as a frontend, a backend, and a database, add them to a Pod, and manage them in unison.<\/p>\n<p>The closest Docker gets to this is with Compose. Using Compose requires you to write a <code>docker-compose.yml<\/code> file and use the separate <code>docker-compose<\/code> binary. Podman lets you create Pods using one command without leaving the terminal.<\/p>\n<p>When you need to export a Pod\u2019s definition, Podman will produce a Kubernetes-compatible YAML manifest. You can take the manifest and apply it directly to a Kubernetes cluster. This narrows the gap between running a container in development and launching it onto production infrastructure.<\/p>\n<pre>podman generate kube<\/pre>\n<h2 id=\"rootless-containers\"><span class=\"ez-toc-section\" id=\"Rootless_Containers\"><\/span>Rootless Containers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Podman supports <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.docker.com\/engine\/security\/rootless\">rootless containers<\/a>. This helps you lock down your security by preventing containers from running as the host\u2019s <code>root<\/code> user. Docker now supports <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.docker.com\/engine\/security\/rootless\">rootless mode<\/a> as a daemon configuration option. Podman had rootless before Docker and places a greater emphasis on its use.<\/p>\n<p>First, install <code>slirp4netns<\/code>:<\/p>\n<pre>yum install slirp4netns<\/pre>\n<p>Next, configure a quantity of user-scoped network namespaces:<\/p>\n<pre>echo \"user.max_user_namespaces=28633\" &gt; \/etc\/sysctl.d\/userns.conf&#13;\nsysctl -p \/etc\/sysctl.d\/userns.conf<\/pre>\n<p>This command enables the use of network namespaces without being <code>root<\/code>.<\/p>\n<p>Now, you\u2019re ready to run a rootless container! Connect to the server as an ordinary user. Start a new container with <code>podman run<\/code>. It will be created with the UID of your user account instead of <code>root<\/code>.<\/p>\n<p>Besides fully rootless namespaces, <code>podman<\/code> is scoped to the current user by default. Your images and containers are stored in your user\u2019s <code>$HOME<\/code> folder. When you run <code>podman ps<\/code> or <code>podman images<\/code>, you\u2019ll only see <em>your<\/em> content instead of every resource on the system.<\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Podman is an OCI-compliant container runtime that works without a daemon. The CLI implements all the core Docker commands. You can easily transition to Podman or use it alongside an existing Docker installation.<\/p>\n<p>Unlike Docker, Podman has first-class support for managing multiple containers. The Pod model makes it easy to work with a stack of services. You can stop, restart, and delete all the associated containers by using pod-level commands.<\/p>\n<p>Podman\u2019s also ready to help you make the jump to container orchestration services. The ability to export Kubernetes-compatible YAML makes Podman a closer match to many containerized production environments. Developers and operators can utilize the same tool to manage their containers, enabling more collaboration and flexibility.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/11575\/what-is-podman-and-how-does-it-differ-from-docker\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#What Is Podman and How Does It Differ from Docker? \u2013 CloudSavvy IT&#8221; Podman is a container engine that\u2019s compatible with the OCI Containers specification. Podman is part of RedHat Linux, but can also be installed on other distributions. As it\u2019s OCI-compliant, Podman can be used as a drop-in replacement for the better-known Docker runtime&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":266731,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/05\/c4b5f09b.jpeg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-266730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/266730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=266730"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/266730\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/266731"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=266730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=266730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=266730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}