The underlying file system on my machine is case sensitive (i.e. “foo” and “Foo” are considered to be different files). Mounting a shared directory (e.g. docker run -i -t -v ~/git:/code imagename) should mount as case sensitive, as well.
Actual behavior
Inside the container, the mounted volumes (which show as type “osxfs”) are mounted as case INsensitive. (i.e. “Foo”, “foo”, “fOo”, etc are all the same file).
Hopefully there can be a serious response :).
I have the same problem with windows. By setting the registry and /etc/fstab according to this: http://superuser.com/questions/266110/how-do-you-make-windows-7-fully-case-sensitive-with-respect-to-the-filesystem
I am able to produce files that are case sensitive, e.g., T.gds and t.gds in the same directory are different files with different content. But when docker run with volume mount like this,
docker run -it --volume=/local/case/sensitive/dir:/case-sensitive image-name bash,
and look in /case-sensitive the two files T.gds and t.gds both contain the same data.
Is there a way around this?
Here is a trick that I just learned and will share this. In any new APFS based Mac you can do this which appears to be working. The following will create a new volume that which is case-sensitive (APFSX) that you can use for your volume data. Note: You should do this in a fresh directory.