There is a problem using -v "%desktopPath%\%folderName%":/dobot/userdata/project:rw, it will report that the file /dobot/userdata/project/properties/controlCabType.json does not exist, and there is no problem using -v "%desktopPath%\%folderName%":/dobot/userdata/project/project:rw. This file /dobot/userdata/project/properties/controlCabType.json was generated during the creation of container images dobotv4vc:v4510b2. When executing docker run, the same container image is used, with only a difference after the -v option. I have added rw permissions to the shared directory, but there is still a problem. What is the problem?

My container image is based on Debian:bookworm, and my hosting system is Windows 10.

Docker run complete instruction:

docker run --dns= -d --name=crv4 --network bridge ^
    -p 2022:22 -p 2502:502 -p 2503:503 -p 1502:1502 -p 1503:1503     -p 18083:8083    -p 18883:1883 ^
    -p 22000:22000 -p 22001:22001  -p 29999:29999  -p 30004:30004  -p 30005:30005  -p 30006:30006 ^
    -p 40001:40001 -p 40002:40002  -p 40003:40003  -p 40004:40004  -p 40005:40005  -p 40006:40006 ^
    -p 65501:65501 -p 65502:65502  -p 65503:65503  -p 65504:65504  -p 65505:65505  -p 65506:65506 ^
    -p 65511:65511 -p 65512:65512  -p 65513:65513  -p 65514:65514  -p 65515:65515  -p 65516:65516 ^
    -p 65521:65521 -p 65522:65522  -p 65523:65523  -p 65524:65524  -p 65525:65525  -p 65526:65526 ^
    -p 65527:65527  -v "%desktopPath%\%folderName%":/dobot/userdata/project:rw    dobotv4vc:v4510b2

1 Answer 1


When you use

-v "%desktopPath%\%folderName%":/dobot/userdata/project:rw

the /dobot/userdata/project directory inside the running container provides access to %desktopPath%\%folderName% on the host. If the program running inside the container expects to find /dobot/userdata/project/properties/controlCabType.json, then that file needs to be present in %desktopPath%\%folderName%\properties on the host. You mention that the file was generated during the creation of the container image; by mounting a volume on /dobot/userdata/project, you’re masking that file in the image.


-v "%desktopPath%\%folderName%":/dobot/userdata/project/project:rw

the volume is mounted on /dobot/userdata/project/project, and /dobot/userdata/project itself still provides access to the files in the container image (apart from anything under the project directory there).

  • When creating the image, doesn't controllCabType.json already exist in the image? docker run is just starting the container, should this file be generated again? I understand a bit, but not very clearly.
    – Vimer
    Feb 20 at 10:23
  • When I first create file controllCabType.json externally and then execute dockerfile to generate the image, there is still a problem.
    – Vimer
    Feb 20 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .