The underlying file system on my machine (Mac OS X) 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.
- Diagnostic ID from "Diagnose & Feedback" in the menu.
- a reproducible case if this is a bug, Dockerfiles FTW
- page URL if this is a docs issue or the name of a man page
- host distribution and version (OSX 10.10.x, OSX 10.11.x)
Host
On the host (Mac OS X), Foo, FOO, and foo are all the same file because it's case insensitive, which is expected behaviour.
~/Desktop/docker-case-test Kingori$ touch foo
~/Desktop/docker-case-test Kingori$ touch Foo
~/Desktop/docker-case-test Kingori$ touch FOO
~/Desktop/docker-case-test Kingori$ ls -la
total 0
drwxr-xr-x 3 Kingori staff 102 17 Aug 11:33 .
drwx------+ 17 Kingori staff 578 17 Aug 11:31 ..
-rw-r--r-- 1 Kingori staff 0 17 Aug 11:33 foo
Container
Inside the container (Ubuntu 12.04), the mounted volumes (which show as type "osxfs") are mounted as case INsensitive (which shouldn't be the case).
~/Desktop/docker-case-test Kingori$ docker run -v ~/Desktop/docker-case-test/:/root/test-code/ -it ubuntu:12.04.5 /bin/bash
root@d99b92c89706:/# ls -la /root/test-code/Foo /root/test-code/foo /root/test-code/FOO
-rw-r--r-- 1 root root 0 Aug 17 09:43 /root/test-code/FOO
-rw-r--r-- 1 root root 0 Aug 17 09:43 /root/test-code/Foo
-rw-r--r-- 1 root root 0 Aug 17 09:43 /root/test-code/foo
That shouldn't work.
Source ... https://forums.docker.com/t/volume-mounts-case-insensitive/18867