Support for --device following (absolute) symlinks was added in #20684 (fix for issue #13840)
However this doesn't work if the symlink's target is a relative path. Since udev (one of the main reasons for this feature IMO) only generates relative path symlinks this isn't very usable currently.
The problem is that https://github.com/yongtang/docker/blob/master/daemon/container_operations_unix.go#L314 blindly assumes that the symlink target is absolute.
Example:
$ ls -l /dev/ttyACM1
crw-rw---- 1 root dialout 166, 1 Apr 23 15:37 /dev/ttyACM1
$ ls -l /dev/somealias
lrwxrwxrwx 1 root root 7 Apr 23 15:37 /dev/somealias -> ttyACM1
$ docker run --rm -it --device /dev/somealias:/dev/something alpine /bin/bash
docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/somealias": lstat ttyACM1: no such file or directory.
Support for
--devicefollowing (absolute) symlinks was added in #20684 (fix for issue #13840)However this doesn't work if the symlink's target is a relative path. Since udev (one of the main reasons for this feature IMO) only generates relative path symlinks this isn't very usable currently.
The problem is that https://github.com/yongtang/docker/blob/master/daemon/container_operations_unix.go#L314 blindly assumes that the symlink target is absolute.
Example: