How to run postgres docker image in Windows using "–mount" syntax?

I am trying to make my Ubuntu-based docker container eco setup scripts work in Windows, cuz new colleague is using Windows.

So I have this script, that works like a charm on my Ubuntu dev env:

docker stop my-db
docker rm my-db
docker volume rm my-vol
docker volume create my-vol 
docker run -d -p 5432:5432 --name my-db -e POSTGRES_PASSWORD=SystemAdmin42  --mount type=volume,source=my-vol,target=/var/lib/postgresql/data postgres &&

dotnet ef database update -p src/My.Data/My.Data.csproj -s src/My.WebApi/My.WebApi.csproj

It, however, fails in Windows environment with the following message:

C:Program FilesDockerDockerResourcesbindocker.exe: Error
response from daemon: invalid mount config for type “volume”: invalid
mount path: ‘C:/Program Files/Git/var/lib/postgresql/data’ mount path
must be absolute. See ‘C:Program
FilesDockerDockerResourcesbindocker.exe run –help’.

I am reluctant to switch to “volume” syntax, cuz I already use “mount” and apparently it is recommended to use “mount”: https://docs.docker.com/storage/bind-mounts/

Source: StackOverflow