[
https://issues.apache.org/jira/browse/YETUS-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16575517#comment-16575517
]
Jack Bearden commented on YETUS-657:
------------------------------------
Volume behavior is way different now. Don't delete your host file for your
mount! !https://issues.apache.org/jira/images/icons/emoticons/smile.png!
docker run --mount type=bind,source=/tmp/coolfile.txt,target=/tmp/coolfile.txt
-t hadoop /bin/bash
{code:java}
bash-4.1# ls -la
ls: cannot access coolfile.txt: No such file or directory
total 12
drwxrwxrwt 1 root root 4096 Aug 9 22:36 .
drwxr-xr-x 1 root root 4096 Aug 9 22:36 ..
-????????? ? ? ? ? ? coolfile.txt{code}
> volumes on non-existent files creates a directory
> -------------------------------------------------
>
> Key: YETUS-657
> URL: https://issues.apache.org/jira/browse/YETUS-657
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Affects Versions: 0.8.0
> Reporter: Allen Wittenauer
> Assignee: Allen Wittenauer
> Priority: Blocker
>
> It would appear that at some point docker's behavior has changed with regards
> to volumes and non-existent files.
> When running docker -v file:file:
> In 17.05 (ASF Jenkins), this creates a file and good to go.
> In 17.12 and 18.05, this creates a directory.
> In order to make this safe, there are multiple routes that could be
> approached:
> a) only mount directories
> b) make sure the file exists before the volume mount
> In all instances, the -v params for docker need to get audited to make sure
> things are working as expected. In particular, some of the reporting is
> known to be broken, thus making this a blocking bug.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)