nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

How can I read the contents of the USB dongle after restarting the container

Open shilaidun opened this issue 2 years ago • 4 comments

Description

When I use docker with --network=host, I insert the usb dongle. and then after restarting the docker container, I can read the usb content. However, I use nerdctl to run the container and insert the usb dongle. After nerdctl restart , I cannot read the usb content. The reason is that docker is in After restarting, /dev/usb can be mounted in the container I guess

Steps to reproduce the issue

1.nerdctl run --network=host --privileged=true images:v1.0.0 --name=test 2.Insert the usb dongle 3.nerdctl restart test 4.read th usb dongle, it show not found , I guess /dev/usb can not be found , because when I mount /dev/usb in container ,it WORKS

Describe the results you received and expected

After restarting container,I can read the usb dongle like docker

What version of nerdctl are you using?

1.7.2

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

shilaidun avatar Dec 15 '23 02:12 shilaidun

+1

xyt-xuyang avatar Dec 15 '23 02:12 xyt-xuyang

+1

zhangwendongvip avatar Dec 15 '23 02:12 zhangwendongvip

Is this specific to --net=host ?

AkihiroSuda avatar Dec 15 '23 04:12 AkihiroSuda

Is this specific to --net=host ?

sorry , I made a mistake , maybe specific to --privileged=true or --net=host

shilaidun avatar Dec 15 '23 04:12 shilaidun