Docker Community Forums

Share and learn in the Docker community.

Mounting a directory to a container gets set with wrong path

I am trying to mount a directory of my host machine to a container.
The command I use for the same:

docker run --name test -v "$(pwd)":/app <image-name>

The pwd is like = /d/Docker/ProjectsWithDocker/react-frontend

But when I inspect I get (docker inspect test):

"Mounts": [
            {
                "Type": "bind",
                "Source": "D:\\Docker\\ProjectsWithDocker\\react-frontend;C",
                "Destination": "\\Program Files\\Git\\app",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }

Note the “Source” got appended with a ;C and because of this correct directory isn’t mounted.
How do I fix this ?