Mounting Volume Using Docker – No Files Being Added

I am trying to mount a volume using docker command on WSL (Bash). But the files and folders I need to mount do not show up to Docker, hence, when I run the docker command it says file not found.

I am trying to simply use the Alpine Container to see if I can make it work. But it also fails to recognize all the files/folders I have on the dir I run it on.

The following command:

docker run --rm -v /c/Users/alexandrec/Desktop/AWS_Layers/pandas:/data alpine ls /data

Returns:

test

And this command:

/mnt/c/Users/alexandrec/Desktop/AWS_Layers/pandas$ ls -la

Returns:

-total 2238
-drwxrwxrwx 0 root root 512 May 29 15:22 .
-drwxrwxrwx 0 root root 512 May 29 14:56 ..
-rwxrwxrwx 1 root root 254 May 28 16:52 get_layer_packages.sh
-rwxrwxrwx 1 root root  85 May 29 11:31 my_module.py
-drwxrwxrwx 0 root root 512 May 29 15:22 New folder
-drwxrwxrwx 0 root root 512 May 28 16:49 python
-rwxrwxrwx 1 root root  28 May 28 14:56 requirements.txt
-drwxrwxrwx 0 root root 512 May 29 14:56 test
-drwxrwxrwx 0 root root 512 May 28 20:30 var

Somehow most folders/files in the DIR do not get mounted only test.

Eventually I want to be able to run this:

docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 my_module.my_handler

Which currently returns:

START RequestId: d3df9063-56ea-4c56-b097-2932c633d74f Version: $LATEST
Unable to import module 'my_module': No module named 'my_module'
END RequestId: d3df9063-56ea-4c56-b097-2932c633d74f
REPORT RequestId: d3df9063-56ea-4c56-b097-2932c633d74f Duration: 0 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 19 MB

{"errorMessage": "Unable to import module 'my_module'"}

I just don’t seem to figure out if this is a permission problem or something related to Windows/Docker/Linux interactions.

The following link shows my bash terminal commands: https://imgur.com/4tqpdaR

Source: StackOverflow