Use Case
When you bind a single file in a Docker volume like that:
./mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
You may end up with the following error:

Cause
When Docker doesn’t find the file you want to bind from the Host, it creates an empty directory. In this example, since Docker doesn’t find the file ./mnt/airflow/airflow.cfg from the host, it creates an empty directory that will be bound to the file /usr/local/airflow/airflow.cfg in the Docker container.
Solution
First, check your Docker settings and make sure Docker can access your file as shown in “Shared Folders” or “File Sharing”
On Windows:

Here, the file you want to bind should be in the folder or subfolders of C:/Users (i.e: C:/Users/myname/documents/airflow.cfg)
On Mac:

Once your file is in a subfolder of a shared folder, you can move forward
Retry without changing anything, to verify if it works now you have shared the correct folder. If it doesn’t work,
Try to run your docker container like that:
docker run airflow -p 8080:8080 -v /${pwd}/mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
If it doesn’t work, try the absolute path
docker run airflow -p 8080:8080 -v /home/user/my_files/mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
Try:
docker run airflow -p 8080:8080 -v "/c/Users/Program Files/mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg"
If there is spaces in your path, you must use double quotes. Don’t use C:/my/path/:/usr/local/airflow as Docker will detect two “:” which won’t work. That’s why you have to use /c/ instead of C:/