Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft Development Dockerfile #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianrubisch
Copy link

@julianrubisch julianrubisch commented Oct 3, 2023

Good morning!

I thought I'd spike the creation of a Dockerfile which might or might not be useful for local development. (It is possible to use the local sound device as a passthrough, I've explored this here a while ago.)

The build command is

docker buildx build -t ubuntu-avb . 

Currently I'm stuck at the modprobe step, which needs privileged access to run. But even if I run the container manually (docker run --rm -ti --privileged ubuntu-avb) and try to load the module, I get:

# modprobe -S $KVERSION snd-avb
modprobe: ERROR: could not insert 'snd_avb': Exec format error

dmesg output:

[47018.397452] module soundcore: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time

This might have to do with the following warning during make:

Skipping BTF generation for /linux-avb-driver/snd-avb.ko due to unavailability of vmlinux

Which is probably due to the use of linux-virtual headers. So it might not be possible after all...

@julianrubisch
Copy link
Author

Note: Apparently running modprobe in a CMD on container boot is the way to go, but I can't get past the Exec format error for now

@grrrr
Copy link
Collaborator

grrrr commented Oct 3, 2023

Not sure what the problem is, but passing KVERSION to make should not be necessary if one is building for the running kernel. Exec error could be an architecture or kernel version mismatch.

@grrrr
Copy link
Collaborator

grrrr commented Oct 3, 2023

By the way, i have CI running on the gitlab server which mirrors the github project, and vice versa.

@julianrubisch
Copy link
Author

Not sure what the problem is, but passing KVERSION to make should not be necessary if one is building for the running kernel. Exec error could be an architecture or kernel version mismatch.

yeah the problem is that $(uname -r) will output the kernel version of the host system, which in my case is orbstack. using linux-virtual under linuxkit is actually the way it's supposed to work, but I guess I'm pushing the boundaries here.

Anyway, not a real problem, I just pondered how I'd go about setting up a minimal local dev environment. I'll keep working on this when I have time.

@grrrr
Copy link
Collaborator

grrrr commented Oct 3, 2023

Btw, out of interest, i read this article on kernel modules in Docker.
Obviously, the modules are not isolated in the Docker environment. In this case, why use Docker at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants