From 7ca3aae61c19a8ed217d5c2a41c86363f6d2e998 Mon Sep 17 00:00:00 2001 From: Shariq Ahmed Khan Date: Mon, 16 Dec 2024 11:32:45 +0100 Subject: [PATCH 1/3] Update 05_persisting_data.md Added info for those running containers in Windows and are curious to find where is /var or what it would be like if they were running Windows containers --- .../workshop/05_persisting_data.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/get-started/workshop/05_persisting_data.md b/content/get-started/workshop/05_persisting_data.md index 60b0e17c2b7..660c69eb458 100644 --- a/content/get-started/workshop/05_persisting_data.md +++ b/content/get-started/workshop/05_persisting_data.md @@ -194,6 +194,36 @@ You should see output like the following: The `Mountpoint` is the actual location of the data on the disk. Note that on most machines, you will need to have root access to access this directory from the host. +This path is relative to Linux host machine and also in case you are running containers on Windows OS, +it means you are using Linux containers. Although, Windows containers have limited image support comapred +to Linux containers (such as contiki-ng), you can try to switch from Linux Container to Windows containers +and run following command to witness the relative path of volume changes on Linux based based to Windows based path. + +```console + docker volume create todo-app + docker volume ls +``` + +you will see volume by name todo-app, now perform volume inspection to see it's path + +```console + docker volume inspect todo-app +``` +your output will look like +``` +[ + { + "CreatedAt": "2024-12-16T11:24:56+01:00", + "Driver": "local", + "Labels": null, + "Mountpoint": "C:\\ProgramData\\Docker\\volumes\\abc\\_data", + "Name": "abc", + "Options": null, + "Scope": "local" + } +] +``` + ## Summary In this section, you learned how to persist container data. From c77292459e4a94368fd3ab27ff8291561f40e954 Mon Sep 17 00:00:00 2001 From: Shariq Ahmed Khan Date: Sun, 5 Jan 2025 12:03:10 +0100 Subject: [PATCH 2/3] Update 05_persisting_data.md changed error: container's instead of containers --- content/get-started/workshop/05_persisting_data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/get-started/workshop/05_persisting_data.md b/content/get-started/workshop/05_persisting_data.md index 660c69eb458..b29daae96f1 100644 --- a/content/get-started/workshop/05_persisting_data.md +++ b/content/get-started/workshop/05_persisting_data.md @@ -21,7 +21,7 @@ changes won't be seen in another container, even if they're using the same image ### See this in practice -To see this in action, you're going to start two containers. In one container, +To see this in action, you're going to start two container's. In one container, you'll create a file. In the other container, you'll check whether that same file exists. From 445358863c2ff726d6f224b6e686b1ca57074f0a Mon Sep 17 00:00:00 2001 From: Shariq Ahmed Khan Date: Sun, 5 Jan 2025 12:10:29 +0100 Subject: [PATCH 3/3] Update 05_persisting_data.md tried alternative sentences to make it clear --- content/get-started/workshop/05_persisting_data.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/content/get-started/workshop/05_persisting_data.md b/content/get-started/workshop/05_persisting_data.md index b29daae96f1..3ab55c6bf45 100644 --- a/content/get-started/workshop/05_persisting_data.md +++ b/content/get-started/workshop/05_persisting_data.md @@ -21,7 +21,7 @@ changes won't be seen in another container, even if they're using the same image ### See this in practice -To see this in action, you're going to start two container's. In one container, +To see this in action, you're going to start two containers. In one container, you'll create a file. In the other container, you'll check whether that same file exists. @@ -194,10 +194,7 @@ You should see output like the following: The `Mountpoint` is the actual location of the data on the disk. Note that on most machines, you will need to have root access to access this directory from the host. -This path is relative to Linux host machine and also in case you are running containers on Windows OS, -it means you are using Linux containers. Although, Windows containers have limited image support comapred -to Linux containers (such as contiki-ng), you can try to switch from Linux Container to Windows containers -and run following command to witness the relative path of volume changes on Linux based based to Windows based path. +This path is relative to the Linux host machine. If you're running containers on Windows OS, you're likely using Linux containers. While Windows containers have limited image support compared to Linux containers, you can switch to Windows containers and run the following command to observe how the relative path of volumes changes from Linux-based to Windows-based paths. ```console docker volume create todo-app