Skip to content

Commit bf5c946

Browse files
committed
add volume mount information for sidecar containers
1 parent 9ec96c5 commit bf5c946

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

articles/app-service/includes/tutorial-sidecar/common-faqs.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,25 @@ No. App Service routes internet requests only to the main container. For code-ba
1818

1919
For more information on configuring `IsMain`, see [Microsoft.Web sites/sitecontainers](/azure/templates/microsoft.web/sites/sitecontainers).
2020

21+
### How do I use volume mounts?
22+
23+
The Volume mounts feature enables you to share non-persistent files and directories between containers within your Web App.
24+
25+
:::image type="content" source="../../media/tutorial-sidecar/configure-volume-mounts.png" alt-text="Screenshot showing a volume mount configuration for a sidecar container.":::
26+
27+
**Volume sub path:** This is a logical directory path that is automatically created, and is not referenced within the container. Containers that are configured with the same volume sub path can share files and directories with each other.
28+
29+
**Container mount path:** This corresponds to a directory path that you reference within the container. The container mount path is mapped to the volume sub path.
30+
31+
For example, suppose the following volume mounts are configured:
32+
| Sidecar name | Volume sub path | Container mount path | Read-only |
33+
| ------------ | --------------- | -------------------- | --------- |
34+
| Container1 | /directory1/directory2 | /container1Vol | False |
35+
| Container2 | /directory1/directory2 | /container2Vol | True |
36+
| Container3 | /directory1/directory2/directory3 | /container3Vol | False |
37+
| Container4 | /directory4 | /container1Vol | False |
38+
39+
Based on these settings, the following conditions apply:
40+
- If Container1 creates **/container1Vol/myfile.txt**, Container2 can read the file via **/container2Vol/myfile.txt**.
41+
- If Container1 creates **/container1Vol/directory3/myfile.txt**, Container2 can read the file via **/container2Vol/directory3/myfile.txt**, and Container3 can read and write to the file via **/container3Vol/myfile.txt**.
42+
- Container4 does not share a volume mount in common with any of the other containers.
1.84 KB
Loading

0 commit comments

Comments
 (0)