Skip to content

Instantly share code, notes, and snippets.

@itskingori
Last active August 17, 2016 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itskingori/c98da77ecdc93592c3290bc651c8b657 to your computer and use it in GitHub Desktop.
Save itskingori/c98da77ecdc93592c3290bc651c8b657 to your computer and use it in GitHub Desktop.
An issue I'm experiencing ...

Expected behaviour

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.

Actual behavior

Information

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

Steps to reproduce the behaviour (actual behaviour)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment