I have a problem setting up a Docker image that interacts with a USB device on Ubuntu 18.04
. I get the following errors when running the rmmod
command in a script run from within the container to begin interacting with this USB device:
rmmod: ERROR: Module ftdi_sio is not currently loaded
rmmod: ERROR: Module usbserial is not currently loaded
I have got this to work when running the image from a machine running Ubuntu 20.04
by installing linux-modules-extra-5.8.0-53-generic
in the Docker image. However, when I try to install the equivalent (linux-modules-extra-4.15.0-143-generic
I think) in the Docker image running on Ubuntu 18.04
I get the following error when trying to build the image:
E: Unable to locate package linux-modules-extra-4.15.0-143-generic
E: Couldn't find any package by glob 'linux-modules-extra-4.15.0-143-generic'
E: Couldn't find any package by regex 'linux-modules-extra-4.15.0-143-generic'
Maybe I’m just trying to install the wrong thing? I’ve also tried installing linux-modules-4.15.0-143-generic
but this gives the same error. Any ideas where I’m going wrong?
EDIT: It may be relevant to note that whilst I want to run my Docker image on a Ubuntu 18.04
machine, it is actually running a Ubuntu 20.04
-based image. I guess that, because the running container inherits the host machine kernel, I need the corresponding linux-modules-extra
version installed in the image which would be 4.15.0-143-generic
?