Setting workdir as subdirectory of mounted directory fails #32708
Labels
area/runtime
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
version/17.03
Description
The documentation for the "-w" flag on docker create/run states that the directory will be created if it does not already exist. This does not appear to work when the requested workdir is a subdirectory of a mounted volume.
The error returned is always:
Starting container process caused "chdir to cwd (\"some directory") set in config.json failed: no such file or directory
This looks like an order of operations issue, where
chdir
is called ahead of the volume creation. It is not clear if this is a bug/feature/limitation of the system.Steps to reproduce the issue:
docker run -v /tmp/:/tmp/ -w /tmp/random-directory-name/ ubuntu:16.04
Describe the results you received:
This returns the following:
Describe the results you expected:
I would expect Docker to first mount the volume, create the subdirectory then set the working directory.
Additional information you deem important (e.g. issue happens only occasionally):
N/A
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Same behaviour also seen on native Linux box running:
The text was updated successfully, but these errors were encountered: