0

I'm trying to run a docker-in-docker (dind) (more specifically, docker:22.06.0-beta.0-dind-rootless) image on a Alpine Linux host, that is running inside VirtualBox, whenever the container starts up, it fails to launch the Docker inside the container, with the following error message:

Signature ok
subject=CN = docker:dind client
Getting CA Private Key
Device "ip_tables" does not exist.
modprobe: can't change directory to '/lib/modules': No such file or directory
open: No such file or directory
[rootlesskit:child ] error: executing [[ip tuntap add name tap0 mode tap] [ip link set tap0 address ...]]: exit status 1

I've figured out that the problem is not on VirtualBox part, as this error didn't happened on an Arch Linux host, so it's specific to Alpine

As Docker uses the host kernel, i've tried enabling it through modprobe ip_tables, but the same error persisted, is there any package that enables these kernel modules on the system, or it's something else that i'm missing?

3
  • I am running a freshly installed Alpine Linux (3.16) system, and modprobe ip_tables works just fine. The command completes without error, and afterwards lsmod shows that the ip_tables and x_tables modules have been loaded. Are you making sure to run the modprobe command on the host (outside of any container)?
    – larsks
    Aug 21, 2022 at 2:13
  • Yes, i'm running modprobe on the host, but for some reason, seems like the docker container can't access kernel modules, even after i tried to explicitly share them with the container by mounting /lib/modules/5.15.61-0-lts directory as a volume on the container Sep 2, 2022 at 22:38
  • If you are running modprobe on the host there's no point in sharing that directory with the container: it's only required when loading a module.
    – larsks
    Sep 2, 2022 at 22:50

1 Answer 1

0

After checking if Alpine's stock kernel config includes support for tun/tap, i've found that CONFIG_TUN is included as a module, so running modprobe tun solved the problem

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .