{"id":9996,"date":"2023-10-07T08:00:22","date_gmt":"2023-10-07T06:00:22","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=9996"},"modified":"2023-10-07T15:27:55","modified_gmt":"2023-10-07T13:27:55","slug":"podman-alternative-zu-docker-unter-linux","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/10\/07\/podman-alternative-zu-docker-unter-linux\/","title":{"rendered":"Podman &#8211; Alternative zu Docker unter Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Mit <a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/10\/docker-anwendungen-und-systeme-unter-linux-virtualisieren-isolieren\/\" data-type=\"post\" data-id=\"2174\">Docker<\/a> erstellen und verwalten Sie Container unter Linux. Durch Docker lassen sich nicht nur Webanwendungen in wenigen Minuten installieren und nutzen, sondern auch Anwendungen anderer Linux-Distributionen &#8211; etwa mittels <a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/10\/distrobox-erleichterungen-fuer-docker-und-podman\/\" data-type=\"post\" data-id=\"2252\">Distrobox<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Doch Docker hat nicht nur die gemeinschaftliche Entwicklung unter <a href=\"https:\/\/hub.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docker Hub<\/a> unter Kosten gesetzt, es nutzt auch einen System-Daemon, der eigentlich nur root (also dem Linux-Admin) zug\u00e4nglich ist.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hier hat Red Hat als erstes reagiert und gleich einmal seine eigene Alternative namens Podman geschaffen, Docker selbst von Liste zur Unterst\u00fctzung unter Red Hat gestrichen. Podman ist nat\u00fcrlich zu Docker kompatibel, auch der Nachteil eines fehlenden Pendants zu Docker-Compose hat sich inzwischen erledigt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Information:<\/strong> Wie schon beschrieben ist Podman zu Docker kompatibel, darum wird dies nur ein Grundlagen-Artikel. Ich selbst nutze nur noch Podman.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Podman installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software zur Virtualisierung wie \u00fcblich ganz einfach \u00fcber die Paket-Verwaltung durch die Pakete &#8222;<strong>podman podman-compose<\/strong>&#8220; (<em>Podman-Compose gibt es unter Debian ab Debian 12<\/em>). Wichtig &#8211; vor der Deinstallation von Docker, also dem Ersetzen von Docker durch Podman, gilt es eventuell vorhandene Container zu sichern, solche lassen sich nat\u00fcrlich durch Podman weiter betreiben. Um bestehende Docker-Container mit Podman zu betreiben, installieren Sie zus\u00e4tzlich das Paket &#8222;<strong>podman-docker<\/strong>&#8222;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Podman nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Grunds\u00e4tzlich k\u00f6nnen Sie Docker komplett durch Podman ersetzen, Sie m\u00fcssen nur ein klein wenig umdenken &#8211; den Befehl <code>docker<\/code> gilt es durch den Befehl <code>podman<\/code> zu ersetzen. Und wie schon beschrieben &#8211; Sie nutzen Podman ohne administrative Rechte.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wie Docker stellt auch Podman eine umfangreiche Hilfe bereite, diese ist auf dieselbe Art wie auch bei Docker zu nutzen. Geben Sie einfach einmal den Befehl <code>podman<\/code> am Terminal ein, lassen ein Leerzeichen und dr\u00fccken zweimal die <kbd>Tabulator<\/kbd>-Taste:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-scaled.jpeg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1024x640.jpeg\" alt=\"\" class=\"wp-image-9997\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Schon listet das Terminal alle verf\u00fcgbaren Befehle und eine kurze Beschreibung auf. Mit den <kbd>Pfeiltasten<\/kbd> (auf \/ ab) navigieren Sie durch diese, die jeweilige markierte Option wird dem Befehl auch gleich nachgestellt. Hat die jeweilige Option weitere Optionen, dr\u00fccken Sie die Tab-Taste noch einmal &#8211; und schon zeigt die Software die verf\u00fcgbaren Optionen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-scaled.jpeg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-1024x640.jpeg\" alt=\"\" class=\"wp-image-9998\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-1-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Podman nutzt nicht automatisch Docker Hub, Sie k\u00f6nnen jedes verf\u00fcgbare Repository nutzen. Um mit Docker auf Docker Hub etwa nach &#8222;<em>Mediawiki<\/em>&#8220; zu suchen, w\u00fcrden Sie so vorgehen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker search mediawiki<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Unter Podman geben Sie zus\u00e4tzlich das Repository an, also etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman search docker.io\/mediawiki<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-scaled.jpeg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-1024x640.jpeg\" alt=\"\" class=\"wp-image-9999\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-2-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr den Download eines Images geben Sie jetzt die komplette Zeile des Images an, also etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman pull docker.io\/library\/mediawiki<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3.jpeg\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-1024x549.jpeg\" alt=\"\" class=\"wp-image-10000\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-1024x549.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-300x161.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-150x80.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-768x412.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-1536x824.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-3-2048x1098.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Wie unter Docker lassen Sie sich wie folgt, mit Podman vorhandene Images anzeigen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman images<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4.jpeg\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"204\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-1024x204.jpeg\" alt=\"\" class=\"wp-image-10001\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-1024x204.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-300x60.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-150x30.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-768x153.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-1536x307.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-4-2048x409.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt l\u00e4sst sich der Container nat\u00fcrlich starten, etwa <code>podman<\/code> <kbd>Tab<\/kbd> <kbd>Tab<\/kbd>, <code>run<\/code> <kbd>Tab<\/kbd> <code>Tab<\/code> und schon werden alle vorhandenen Images angezeigt:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5.jpeg\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"132\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-1024x132.jpeg\" alt=\"\" class=\"wp-image-10002\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-1024x132.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-300x39.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-150x19.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-768x99.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-1536x198.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-5-2048x264.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt k\u00f6nnen Sie noch weitere Optionen einf\u00fcgen und den Container starten, also etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman run --restart=always docker.io\/library\/mediawiki:latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman images<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">lassen Sie sich alle heruntergeladenen Images anzeigen, mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman ps -a<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">alle laufenden Instanzen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6.jpeg\" rel=\"lightbox-6\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"191\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-1024x191.jpeg\" alt=\"\" class=\"wp-image-10003\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-1024x191.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-300x56.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-150x28.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-768x143.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-1536x286.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/podman-6-2048x382.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Es gibt so gesehen nicht wirklich viel umzudenken. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Demn\u00e4chst werden wir uns ansehen, wie wir mit Docker und Podman komplett eigene Images erstellen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Die volle Doku zur Docker-Alternative finden Sie unter <a href=\"https:\/\/podman.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Podman<\/a>.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"9996\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">5    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"9996\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\">0<\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Mit Docker erstellen und verwalten Sie Container unter Linux. Durch Docker lassen sich nicht nur Webanwendungen in wenigen Minuten installieren und nutzen, sondern auch Anwendungen anderer Linux-Distributionen &#8211; etwa mittels Distrobox. Doch Docker hat nicht nur die gemeinschaftliche Entwicklung unter Docker Hub unter Kosten gesetzt, es nutzt auch einen System-Daemon, der eigentlich nur root (also [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66,687,67],"tags":[688,69],"class_list":["post-9996","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-podman","category-virtualisierung","tag-podman","tag-virtualisierung"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/9996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=9996"}],"version-history":[{"count":2,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/9996\/revisions"}],"predecessor-version":[{"id":10041,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/9996\/revisions\/10041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/10004"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=9996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=9996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=9996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}