What is the problem you're trying to solve
Current ctr tool has --device flag to add host device to container, like ctr run --device=/dev/sda1. But it cannot map the host path to container path, like ctr run --device=/dev/sda1:/dev/xyz.
Ref: #3066
Describe the solution you'd like
ctr run --device=/dev/sda1:/dev/xyz will map the path /dev/sda1 to /dev/xyz in container. This behavior is same as docker --device.
Additional context
What is the problem you're trying to solve
Current ctr tool has --device flag to add host device to container, like
ctr run --device=/dev/sda1. But it cannot map the host path to container path, likectr run --device=/dev/sda1:/dev/xyz.Ref: #3066
Describe the solution you'd like
ctr run --device=/dev/sda1:/dev/xyzwill map the path /dev/sda1 to /dev/xyz in container. This behavior is same as docker --device.Additional context
containerd/cmd/ctr/commands/run/run_unix.go
Lines 266 to 268 in 2818fde