0

I am relatively new to docker and ubuntu, what i was trying to get my adb devices recognized in adb container.

I was checking some post and i found that we can also use lsusb to do a sanity check if device is connected or not

Connecting to a USB Android Device in a Docker Container via adb

I have an ubuntu docker container,command lsusb brings no result.

do i need to explicitly install it ?

Should not an ubuntu image have this installed by default ? Correct me if i am wrong in my understanding.

pankaj mishra
  • 2,555
  • 2
  • 17
  • 31

1 Answers1

2

Containers don't have direct hardware access by default. Giving a container direct hardware access would expose security risks, including the ability to escape the container.

You can give hardware access to a container by running it with --privileged to access everything, or --device=/dev/x:/dev/x to give access to a single device "x".

BMitch
  • 231,797
  • 42
  • 475
  • 450