Create a volume from a file Docker

I’m trying to mount a file into a docker container, i tried with volumes or mount but can’t figure it out (the file exist on the docker container) :

    -v /home/edsadmin/onlyoffice/logs/onlyoffice:/var/log/onlyoffice  
    -v /home/edsadmin/onlyoffice/data:/var/www/onlyoffice/Data 
    -v /home/edsadmin/onlyoffice/logs/nginx:/etc/onlyoffice/documentserver/nginx 
    --mount type=bind,source=$(pwd)/onlyoffice/local/local.json,target=/etc/onlyoffice/documentserver/local.json onlyoffice/documentserver ```

Error : 

```docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/home/edsadmin/onlyoffice/local/local.json\" to rootfs \"/var/lib/docker/overlay2/fb9a952df135aad0d9729e8cf3399a723d5dac8c053ab64f6fc441d2a90e5146/merged\" at \"/var/lib/docker/overlay2/fb9a952df135aad0d9729e8cf3399a723d5dac8c053ab64f6fc441d2a90e5146/merged/etc/onlyoffice/documentserver/local.json\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
ERRO[0000] error waiting for container: context canceled

Source: StackOverflow