{"id":17775,"date":"2024-08-15T11:09:15","date_gmt":"2024-08-15T11:09:15","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=17775"},"modified":"2025-01-10T11:16:29","modified_gmt":"2025-01-10T11:16:29","slug":"containers-vs-virtual-machines","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=17775","title":{"rendered":"Containers vs. Virtual Machines"},"content":{"rendered":"<table>\n<tr>\n<th><\/th>\n<th><strong>Containers<\/strong><\/th>\n<th><strong>Virtual Machines<\/strong><\/th>\n<\/tr>\n<tr>\n<th>Representative<\/th>\n<td>Docker<sup>1<\/sup><\/td>\n<td>VirtualBox<\/td>\n<\/tr>\n<tr>\n<th>Shared<\/th>\n<td>HW + OS<\/td>\n<td>HW<\/td>\n<\/tr>\n<tr>\n<th>Daemon<\/th>\n<td>Engine<\/td>\n<td>Hypervisor<\/td>\n<\/tr>\n<tr>\n<th>Persistence<\/th>\n<td>Image<sup>2<\/sup> (+ Volume<sup>3<\/sup>)<\/td>\n<td>Image<\/td>\n<\/tr>\n<tr>\n<th>Instance<\/th>\n<td>Container<\/td>\n<td>VM<\/td>\n<\/tr>\n<tr>\n<th>Workflow<\/th>\n<td>\n<ol>\n<li>Write Docker File<\/li>\n<li>Create Docker Image<\/li>\n<li>Run Container<\/li>\n<\/ol>\n<\/td>\n<td>\n<ol>\n<li>Get OS Image<\/li>\n<li>Create VM Image<\/li>\n<li>Run VM<\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<tr>\n<th>Pros<\/th>\n<td>\n<ul>\n<li>Better performance<\/li>\n<li>Lower resource consumption<\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li>OS diversity (for VMs)<\/li>\n<li>Stronger isolation<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<p><sup>1<\/sup> Docker uses cgroups (resource restriction) and namespaces (isolation).<br \/>\n<sup>2<\/sup> Provides the initial system setup for the containers.<br \/>\n<sup>3<\/sup> Persists user data to be shared between containers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Containers Virtual Machines Representative Docker1 VirtualBox Shared HW + OS HW Daemon Engine Hypervisor Persistence Image2 (+ Volume3) Image Instance<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[37,82],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17775"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17775"}],"version-history":[{"count":32,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17775\/revisions"}],"predecessor-version":[{"id":18173,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17775\/revisions\/18173"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17775"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}