{"id":26409,"date":"2023-06-30T15:06:56","date_gmt":"2023-06-30T13:06:56","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=26409"},"modified":"2023-06-30T15:06:58","modified_gmt":"2023-06-30T13:06:58","slug":"all-about-how-docker-containers-and-data-are-stored-on-its-host","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/","title":{"rendered":"All about how Docker containers and data are stored on its host"},"content":{"rendered":"\n<p>You&#8217;ve probably already heard about containers and one of the most popular tool used to create them: <a href=\"https:\/\/www.docker.com\" target=\"_blank\" rel=\"noreferrer noopener\">Docker<\/a>. You may wonder how a container stores data on its host, if those data are persistent, if you can find them on the server hosting this container and more broadly how a container is stored on this host. Those are very good questions so let&#8217;s dive into this topic by looking at some examples.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-data-into-one-docker-container\">Data into one Docker container<\/h2>\n\n\n\n<p>I&#8217;ve got a Rocky Linux 8 virtual machine and I&#8217;ve installed docker in it. Let&#8217;s just create a container with an Ubuntu image on it to play with and understand its interactions with the host.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo docker container run -it --name myubuntu ubuntu:18.04\n...\nroot@5dd708fd5afb:\/# \n<\/pre><\/div>\n\n\n<p>We directly connect into our Ubuntu container and the first test we are going to do is to create a file inside this container with a name that will be easy to find on the host:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nroot@5dd708fd5afb:\/# touch benoit\n\nroot@5dd708fd5afb:\/# ls\nbenoit  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var\nroot@5dd708fd5afb:\/#\n<\/pre><\/div>\n\n\n<p>I&#8217;ve created a file with my first name that I can now find on my Rocky host:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo find \/var\/lib\/docker\/ -name benoit\n\/var\/lib\/docker\/overlay2\/6796ec566b5bbdbcfa99efe742a042b574c17633a504d2d31f87a604e194f0a1\/diff\/benoit\n\/var\/lib\/docker\/overlay2\/6796ec566b5bbdbcfa99efe742a042b574c17633a504d2d31f87a604e194f0a1\/merged\/benoit\n<\/pre><\/div>\n\n\n<p>This file is found in 2 folders. Docker container uses the storage driver overlay2 to store files. You can find all the detailed informations related to it in the <a href=\"https:\/\/docs.docker.com\/storage\/storagedriver\/overlayfs-driver\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docker documentation<\/a>. On the Rocky host you can see in the path name to our file the default folder where all the container data are stored: <strong>\/var\/lib\/docker\/overlay2\/<\/strong> It is then followed by a directory ID and one of the folder used by overlay2: <strong>diff<\/strong>,  <strong>link<\/strong>, <strong>lower<\/strong>, <strong>merged<\/strong> and <strong>work<\/strong>. Without entering into too much details, <strong>diff<\/strong> is the content of the container layer and <strong>merged<\/strong> is the unified view of files from the image and container layer.<\/p>\n\n\n\n<p>So from the host you have access to the content of a container but it is not recommended to interact directly with it as Docker could get confused (it is one of its tasks to manage that).<\/p>\n\n\n\n<p>Then, I exited from this container:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nroot@5dd708fd5afb:\/# exit\nexit\n&#x5B;rocky ~]$\n<\/pre><\/div>\n\n\n<p>Let&#8217;s have a look at what we can see on the host:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo find \/var\/lib\/docker\/ -name benoit\n\/var\/lib\/docker\/overlay2\/6796ec566b5bbdbcfa99efe742a042b574c17633a504d2d31f87a604e194f0a1\/diff\/benoit\n<\/pre><\/div>\n\n\n<p>The file only appear in the <strong>diff<\/strong> folder. The container has exited but has not been deleted so let&#8217;s restart it and see if we can still see our file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker ps -a\nCONTAINER ID   IMAGE           COMMAND                  CREATED             STATUS                      PORTS     NAMES\n5dd708fd5afb   ubuntu:18.04    &quot;\/bin\/bash&quot;              About an hour ago   Exited (0) 6 minutes ago              myubuntu\n\n&#x5B;rocky ~]$ sudo docker start myubuntu\nmyubuntu\n\n&#x5B;rocky ~]$ sudo docker ps\nCONTAINER ID   IMAGE          COMMAND       CREATED             STATUS         PORTS     NAMES\n5dd708fd5afb   ubuntu:18.04   &quot;\/bin\/bash&quot;   About an hour ago   Up 8 seconds             myubuntu\n\n&#x5B;rocky ~]$ sudo docker exec -it -u 0 myubuntu bash\n\nroot@5dd708fd5afb:\/# ls\nbenoit  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var\n<\/pre><\/div>\n\n\n<p>So yes our file is still there! Do we still see it on our Rocky host then?<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo find \/var\/lib\/docker\/ -name benoit\n\/var\/lib\/docker\/overlay2\/6796ec566b5bbdbcfa99efe742a042b574c17633a504d2d31f87a604e194f0a1\/diff\/benoit\n\/var\/lib\/docker\/overlay2\/6796ec566b5bbdbcfa99efe742a042b574c17633a504d2d31f87a604e194f0a1\/merged\/benoit\n<\/pre><\/div>\n\n\n<p>Yep, as the container is started we can now see our file again in the <strong>merged<\/strong> folder. Until the container is deleted, the files created in it are available as they are stored on the host.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-data-into-two-docker-containers\">Data into two Docker containers<\/h2>\n\n\n\n<p>Now let&#8217;s do another test by deleting this container and creating two of them. In each container we&#8217;ll create a file called benoit. In one ssh session:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker container run -it --name myubuntu ubuntu:18.04\n\nroot@68171839b27d:\/# touch benoit\n\nroot@68171839b27d:\/# ls\nbenoit  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var\n<\/pre><\/div>\n\n\n<p>Then in another ssh session:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker container run -it --name myubuntu2 ubuntu:18.04\n\nroot@4ba803c23419:\/# touch benoit\n\nroot@4ba803c23419:\/# ls\nbenoit  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var\n<\/pre><\/div>\n\n\n<p>Let&#8217;s now find out what we see on the Rocky host:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo find \/var\/lib\/docker\/ -name benoit\n\/var\/lib\/docker\/overlay2\/3f074ba37b28f5f2cc533b405ecab3762c092fa406511dc2637264fc0a936200\/diff\/benoit\n\/var\/lib\/docker\/overlay2\/3f074ba37b28f5f2cc533b405ecab3762c092fa406511dc2637264fc0a936200\/merged\/benoit\n\/var\/lib\/docker\/overlay2\/710466e337a994b608e0e65bdd55b803d25c5ebbec81db77f17d74eb830c852f\/diff\/benoit\n\/var\/lib\/docker\/overlay2\/710466e337a994b608e0e65bdd55b803d25c5ebbec81db77f17d74eb830c852f\/merged\/benoit\n<\/pre><\/div>\n\n\n<p>As expected we have 2 pairs of our file in 2 separate folders. One for each container. You may wonder if there is a link between this directory ID and the container ID. Let&#8217;s have a look:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker ps\nCONTAINER ID   IMAGE          COMMAND       CREATED         STATUS         PORTS     NAMES\n4ba803c23419   ubuntu:18.04   &quot;\/bin\/bash&quot;   7 minutes ago   Up 7 minutes             myubuntu2\n68171839b27d   ubuntu:18.04   &quot;\/bin\/bash&quot;   7 minutes ago   Up 7 minutes             myubuntu\n<\/pre><\/div>\n\n\n<p>There is no link so how would you know which file belong to which container? I&#8217;m glad you asked! We need to inspect our container in order to link the directory ID to a container ID as shown below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker inspect 4ba803c23419 |grep -i upper\n                &quot;UpperDir&quot;: &quot;\/var\/lib\/docker\/overlay2\/710466e337a994b608e0e65bdd55b803d25c5ebbec81db77f17d74eb830c852f\/diff&quot;,\n\n&#x5B;rocky ~]$ sudo docker inspect 68171839b27d |grep -i upper\n                &quot;UpperDir&quot;: &quot;\/var\/lib\/docker\/overlay2\/3f074ba37b28f5f2cc533b405ecab3762c092fa406511dc2637264fc0a936200\/diff&quot;,\n<\/pre><\/div>\n\n\n<p>Look at this! By inspecting our container we can see the folder used to store its data on our Rocky host.<\/p>\n\n\n\n<p>Finally let&#8217;s delete both containers and see what happens to the data it contained:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker ps -a\nCONTAINER ID   IMAGE           COMMAND                  CREATED          STATUS                       PORTS     NAMES\n4ba803c23419   ubuntu:18.04    &quot;\/bin\/bash&quot;              17 minutes ago   Exited (127) 8 seconds ago             myubuntu2\n68171839b27d   ubuntu:18.04    &quot;\/bin\/bash&quot;              17 minutes ago   Exited (0) 14 seconds ago              myubuntu\n\n&#x5B;rocky ~]$ sudo docker rm 4ba803c23419 68171839b27d\n4ba803c23419\n68171839b27d\n\n&#x5B;rocky ~]$ sudo find \/var\/lib\/docker\/ -name benoit\n\n&#x5B;rocky ~]$ sudo ls \/var\/lib\/docker\/overlay2\/3f074ba37b28f5f2cc533b405ecab3762c092fa406511dc2637264fc0a936200\nls: cannot access &#039;\/var\/lib\/docker\/overlay2\/3f074ba37b28f5f2cc533b405ecab3762c092fa406511dc2637264fc0a936200&#039;: No such file or directory\n\n&#x5B;rocky ~]$ sudo ls \/var\/lib\/docker\/overlay2\/710466e337a994b608e0e65bdd55b803d25c5ebbec81db77f17d74eb830c852f\nls: cannot access &#039;\/var\/lib\/docker\/overlay2\/710466e337a994b608e0e65bdd55b803d25c5ebbec81db77f17d74eb830c852f&#039;: No such file or directory\n<\/pre><\/div>\n\n\n<p>Now our files are gone with the container and they have been deleted from the Rocky host as well. In order to keep container data, you&#8217;ll need to create volumes on which data persists even after the container has been deleted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-is-a-container-stored-on-its-host\">How is a container stored on its host<\/h2>\n\n\n\n<p>Now that we have seen where a file created inside a container is stored on the Rocky host, let&#8217;s find out where the container itself is stored on our Rocky host:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker ps\nCONTAINER ID   IMAGE          COMMAND       CREATED          STATUS          PORTS     NAMES\nc2032ee57de7   ubuntu:18.04   &quot;\/bin\/bash&quot;   10 minutes ago   Up 10 minutes             myubuntu\n\n&#x5B;rocky ~]$ sudo docker inspect c2032ee57de7| grep Id\n        &quot;Id&quot;: &quot;c2032ee57de7097d6e050bc0b2561c8044baae710f01be570cf65ad7e62c7e24&quot;,\n\n&#x5B;rocky ~]$ sudo ls \/var\/lib\/docker\/containers\/c2032ee57de7097d6e050bc0b2561c8044baae710f01be570cf65ad7e62c7e24\nc2032ee57de7097d6e050bc0b2561c8044baae710f01be570cf65ad7e62c7e24-json.log  checkpoints\tconfig.v2.json\thostconfig.json  hostname  hosts  mounts  resolv.conf  resolv.conf.hash\n<\/pre><\/div>\n\n\n<p>Easy! With the container ID we can find the associated folder that is stored in the containers folder of <strong>\/var\/lib\/docker<\/strong><\/p>\n\n\n\n<p>After exiting from the container, we can now delete it and see the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;rocky ~]$ sudo docker ps -a\nCONTAINER ID   IMAGE           COMMAND                  CREATED          STATUS                      PORTS     NAMES\nc2032ee57de7   ubuntu:18.04    &quot;\/bin\/bash&quot;              16 minutes ago   Exited (0) 10 seconds ago             myubuntu\n\n&#x5B;rocky ~]$ sudo docker rm c2032ee57de7\nc2032ee57de7\n\n&#x5B;rocky ~]$ sudo ls \/var\/lib\/docker\/containers\/c2032ee57de7097d6e050bc0b2561c8044baae710f01be570cf65ad7e62c7e24\nls: cannot access &#039;\/var\/lib\/docker\/containers\/c2032ee57de7097d6e050bc0b2561c8044baae710f01be570cf65ad7e62c7e24&#039;: No such file or directory\n<\/pre><\/div>\n\n\n<p>Our container folder on the Rocky host has been deleted at the same time as the container as we could expect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrap-up\">Wrap up<\/h2>\n\n\n\n<p>You should now have all the responses to our questioning at the beginning of this blog. I hope you&#8217;ve learned something interesting today. If you want to learn more about Docker and Kubernetes, or if you feel you have some gap in your knowledge, have a look at our dedicated <a href=\"https:\/\/www.dbi-services.com\/courses\/docker-and-kubernetes-essential-skills\/\" target=\"_blank\" rel=\"noreferrer noopener\">Workshop<\/a> on this topic. You&#8217;ll learned everything you need about those technologies with a lot of opportunities to practice with docker container. See you there!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;ve probably already heard about containers and one of the most popular tool used to create them: Docker. You may wonder how a container stores data on its host, if those data are persistent, if you can find them on the server hosting this container and more broadly how a container is stored on this [&hellip;]<\/p>\n","protected":false},"author":109,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1320,1504],"tags":[762,151,601],"type_dbi":[3018,3017,3016],"class_list":["post-26409","post","type-post","status-publish","format-standard","hentry","category-devops","category-docker","tag-containers","tag-devops","tag-docker","type-containers","type-devops","type-docker"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>All about how Docker containers and data are stored on its host - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"All about how Docker containers and data are stored on its host\" \/>\n<meta property=\"og:description\" content=\"You&#8217;ve probably already heard about containers and one of the most popular tool used to create them: Docker. You may wonder how a container stores data on its host, if those data are persistent, if you can find them on the server hosting this container and more broadly how a container is stored on this [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-30T13:06:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-30T13:06:58+00:00\" \/>\n<meta name=\"author\" content=\"DevOps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DevOps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\"},\"author\":{\"name\":\"DevOps\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\"},\"headline\":\"All about how Docker containers and data are stored on its host\",\"datePublished\":\"2023-06-30T13:06:56+00:00\",\"dateModified\":\"2023-06-30T13:06:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\"},\"wordCount\":811,\"commentCount\":0,\"keywords\":[\"Containers\",\"DevOps\",\"Docker\"],\"articleSection\":[\"DevOps\",\"Docker\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\",\"name\":\"All about how Docker containers and data are stored on its host - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2023-06-30T13:06:56+00:00\",\"dateModified\":\"2023-06-30T13:06:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"All about how Docker containers and data are stored on its host\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\",\"name\":\"DevOps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"caption\":\"DevOps\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/devops\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"All about how Docker containers and data are stored on its host - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/","og_locale":"en_US","og_type":"article","og_title":"All about how Docker containers and data are stored on its host","og_description":"You&#8217;ve probably already heard about containers and one of the most popular tool used to create them: Docker. You may wonder how a container stores data on its host, if those data are persistent, if you can find them on the server hosting this container and more broadly how a container is stored on this [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/","og_site_name":"dbi Blog","article_published_time":"2023-06-30T13:06:56+00:00","article_modified_time":"2023-06-30T13:06:58+00:00","author":"DevOps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DevOps","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/"},"author":{"name":"DevOps","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735"},"headline":"All about how Docker containers and data are stored on its host","datePublished":"2023-06-30T13:06:56+00:00","dateModified":"2023-06-30T13:06:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/"},"wordCount":811,"commentCount":0,"keywords":["Containers","DevOps","Docker"],"articleSection":["DevOps","Docker"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/","url":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/","name":"All about how Docker containers and data are stored on its host - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-06-30T13:06:56+00:00","dateModified":"2023-06-30T13:06:58+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/all-about-how-docker-containers-and-data-are-stored-on-its-host\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"All about how Docker containers and data are stored on its host"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735","name":"DevOps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","caption":"DevOps"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/devops\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/26409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=26409"}],"version-history":[{"count":15,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/26409\/revisions"}],"predecessor-version":[{"id":26433,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/26409\/revisions\/26433"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=26409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=26409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=26409"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=26409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}