Search code examples
linuxdockerfilesystemscross-compilingcase-insensitive

How to make Linux Docker image filesystems case insensitive?


I have a Docker image for cross compilation from Linux to Windows with Mingw-w64. A common issue is that source code and build scrips do not refer in lowercase to filenames. (windows.h/Windows.h, libUser32.a/libuser32.a …)

Is it possible to make any access to the filesystem or some directory in a Docker container case insensitive?


Solution

  • Docker typically uses overlayfs (although it can use other options), which mounts two directories over each other. overlayfs itself doesn't provide a way to make accesses case-insensitive, but you could try making the /var/lib/docker directory on a case-insensitive file system (e.g., a suitably formatted JFS file system) and see if that works.

    However, you probably don't want to do that. Docker on Linux, like virtually every other Unix tool, isn't designed to handle case-insensitive file systems, and you may find various things that break there. Most distros don't support making file systems used by the package manager case insensitive, so if anything breaks, you'll be on your own to fix it.

    You'd be better off with a set of scripts to modify the includes and build scripts to use solely lowercase, or use Wine or a Windows VM to build in a more Windows-like environment.