The following not work as expect:
docker run --rm -it -v /tmp/folder/:/folder --entrypoint /bin/sh image
In container, /folder exists but individual files that are present under /tmp/folder/ are missing and only asterisk is there.
In the container,
ls /folder
*
2
Answers
This turned out to be permission error. Directory need o+rx
The /tmp/folder directory should have at least read and execute permissions. This can be changed by issuing the command
sudo chmod o=rx /tmp/folder
orsudo chmod o=rwx /tmp/folder
, provided that no additional attributes or ACLs are applied.Let us know if it worked.