Docker Community Forums

Share and learn in the Docker community.

Device name with ":"

Hello.

My issue is the following: I want to give to my container full access to a specific device (an FPGA card). So my plan is to use the --device option. This device option’s syntax is the following:
docker run --device=Host Device:Container Device Mapping:Permissions

My problem is the name of my device contains “:” characters like in /dev/mydevice/FAB,yp-troll.0004:00:00.1.0. And so when using this name, docker is lost:
docker: bad mode specified: 00.1.0.

Needless to say I cannot change the name of my device (or use a symbolic link with a simplest name), because this exact name is used by several tools.

How could I use such device name without docker interpreting the “:” in the name ?
(I did try ', ", \, etc)

Thanks in advance…

FYI, I did have the same issue when trying to mount into my container any directory (like /sys/devices/pci0004:00) containing colons in its name. I see in forums that I’m not the only one facing issue with docker when you want to work with file names containing colons. And I did not find any form of escaping for those colons…
No idea really ?? Am I facing a dead end ?