Open rpatterson opened 4 weeks ago
A related thought, it seems like the error message could also be improved. It could clearly indicate whether the error is from creating the volume or using it in a container and it could indicate whether the path error is for the source
/device
or the target
.
Description
The Docker daemon produces a misleading error message when a service uses a shared/top-level/named volume and the
target:
includes a trailing slash. Paths with trailing slashes are valid absolute paths so Docker should accept and handle them correctly. That this causes a failure indicates that the# dockerd
daemon may not be using a proper filesystem path library when handling volume target paths and it seems like it should.Reproduce
Create the following compose project:
Note the resulting error when run:
Remove the trailing slash from
target:
:Note that the container now runs as expected:
Expected behavior
Docker should accept valid absolute paths as volume
target:
paths.docker version
docker info
Diagnostics ID
N/A
Additional Info
No
*diagnose*
tool is available from this installation: