title: Why does Mac OSX still exhibit case insensitivity when using Docker Desktop for Mac
body: <p>I am using Docker Desktop for Mac to containerize a basic LAMP stack in my local environment, then periodically deploying a simple MVC application to a shared Linux server using a Bitbucket pipeline.</p>
  <p>Everything is behaving as expected apart from the router. When in prod, the autoload fails because the Linux environment distinguishes between the routes, App/Controllers/Posts and app/controllers/posts, for example. I realise that for PSR-4 autoloading to work, the case of each folder / namespace and file / class have to match, and clearly the reason it's failing in prod is because of the live environment's case sensitivity highlighting this mismatch.</p>
  <p>However, the obvious reason for using Docker is to avoid these differing behaviours in local and prod environments. Is it definitely the case that using Docker on a Mac won't exhibit case sensitivity, even when in a container based on an Ubuntu image, for instance, so that I can pick up on these issues locally without having to test in prod? An issue raised on Github (<a href="https://github.com/docker/for-mac/issues/320" rel="nofollow noreferrer">https://github.com/docker/for-mac/issues/320</a> back in 2016) suggests that this is not possible due to Mac’s &quot;osxfs”. However, when looking at the Docker for Mac docs (<a href="https://docs.docker.com/docker-for-mac/" rel="nofollow noreferrer">https://docs.docker.com/docker-for-mac/</a>) it would appear that it should pick up on this; specifically:</p>
  <blockquote>
  <p>By default, Mac file systems are case-insensitive while Linux is case-sensitive. On Linux, it is possible to create 2 separate files: test and Test, while on Mac these filenames would actually refer to the same underlying file. This can lead to problems where an app works correctly on a Mac (where the file contents are shared) but fails when run in Linux in production (where the file contents are distinct). <strong>To avoid this, Docker Desktop insists that all shared files are accessed as their original case</strong>. Therefore, if a file is created called test, it must be opened as test...</p>
  </blockquote>
  <p>(bold added by me)</p>
  <p>Does this not indicate that case sensitivity should be exhibited, or am I reading the docs incorrectly? For the record, here is my Dockerfile and docker-compose file:</p>
  <pre><code>FROM php:7.4-apache
  
  RUN a2enmod rewrite
  
  RUN apt-get update
  RUN apt-get install git -y
  RUN apt-get install -y libzip-dev zip
  
  RUN docker-php-ext-install pdo pdo_mysql
  
  RUN curl -sS https://getcomposer.org/installer | php
  RUN mv composer.phar /usr/local/bin/composer
  
  WORKDIR /var/www/developmental
  
  COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf
  </code></pre>
  <pre><code>version: &quot;3.8&quot;
  
  services:
    php:
      build:
        context: .
        dockerfile: ./.docker/Dockerfile
      ports:
        - 8080:80
      volumes:
        - .:/var/www/developmental
  
    db:
      image: mysql/mysql-server
      command: --default-authentication-plugin=mysql_native_password
      ports:
        - 3308:3306
      environment:
        MYSQL_ROOT_PASSWORD: &quot;${DB_ROOT_PASSWORD}&quot;
      volumes:
        - db-data:/var/lib/mysql
        - ./data:/docker-entrypoint-initdb.d
  
  volumes:
    db-data:
  </code></pre>
  <p>Many thanks in advance (and go easy - I'm a Docker rookie and this is my first Stackoverflow question!)</p>