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".
This commit is contained in:
Charlie Arehart 2022-08-30 22:50:06 -05:00 committed by GitHub
parent 83b92e9806
commit bcddda7f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ $ docker container rm devtest
### Mount into a non-empty directory on the container ### 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, 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 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 building a new image. However, it can also be surprising and this behavior