From bcddda7f1377d03d74dbc94dbbe6351057a0e65d Mon Sep 17 00:00:00 2001 From: Charlie Arehart Date: Tue, 30 Aug 2022 22:50:06 -0500 Subject: [PATCH] Clarify bind-mount obscuring of non-empty directories in container The current wording implies that ANY bind mount into a non-empty directory will obscure the files in that directory, but while that's true of bind mounting a directory, it's not true if bind-mounting a single file (from my testing, in a linux container running Docker Desktop for Windows). I simply added that minor (but important) clarification of "a directory". --- storage/bind-mounts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/bind-mounts.md b/storage/bind-mounts.md index 087d44f5be..442dca1fb8 100644 --- a/storage/bind-mounts.md +++ b/storage/bind-mounts.md @@ -158,7 +158,7 @@ $ docker container rm devtest ### Mount into a non-empty directory on the container -If you bind-mount into a non-empty directory on the container, the directory's +If you bind-mount a directory into a non-empty directory on the container, the directory's existing contents are obscured by the bind mount. This can be beneficial, such as when you want to test a new version of your application without building a new image. However, it can also be surprising and this behavior