Volume mounts case insensitive

Expected behavior

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).


  • OS X v 10.11.4
  • Docker v 1.12.0-rc4-beta19

Any tips/tricks/fixes for how to remedy this?

Sounds like you got windows file support right out of the box… lol …

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?

1 Like

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.

mkdir <docker volume directory>
sudo diskutil apfs addVolume disk1 APFSX docker -mountpoint <docker volume directory>
sudo chown -R $(id -u):$(id -g) <docker volume directory>

Ref: Feature to opt-in into a case sensitive file-system (osxfs) on a volume mount · Issue #320 · docker/for-mac · GitHub