Hi,
Say I have a device file in the host: /tmp/mydir/mydevice. I can pass that to a container in two different ways.
Method 1: docker run -v /tmp/mydir/mydevice:/dev/mydevice ubuntu bash
Method 2: docker run --device /tmp/mydir/mydevice ubuntu bash
In both cases, the device file becomes accessible in the container. With Method 1, I can pick a device anywhere in the file system and make it visible inside /dev in the container.
With Method 2, I seem to be constrained to make it available in the path in the container as in the host.
Apart from that, are there any differences between the two?