alpine-make-vm-image icon indicating copy to clipboard operation
alpine-make-vm-image copied to clipboard

Can't run in docker inside github workflow CI

Open dkegel-sigsci opened this issue 3 years ago • 2 comments

See #15

Works fine in github... unless you try to use it inside docker, where it fails with

modprobe: can't change directory to '/lib/modules': No such file or directory
ERROR: No available nbd device found!

Looking around for ideas:

  • alpine-make-vm-image could fall back to guestmount from http://libguestfs.org
  • users could run alpine-make-vm-image using qemu, possibly via a nice wrapper like https://github.com/multiarch/qemu-user-static, https://github.com/dbhi/qus, or https://github.com/gotoz/runq

I forked this project to https://github.com/dankegel/alpine-make-vm-image/tree/test-on-github, added a .github/workflows/test.yml to test running on github, and then gave libguestfs the old college try. Unfortunately, I couldn't get libguestfs to work inside docker, even locally.
But the branch is there in case anyone wants a look.

For now, the best option is still don't run inside docker on github :-)

dkegel-sigsci avatar Sep 16 '20 21:09 dkegel-sigsci

Works fine in github... unless you try to use it inside docker

So why do you run it inside docker? It doesn’t make any sense.

jirutka avatar Dec 07 '20 12:12 jirutka

Because my job requires me to use a mac, and requires my scripts to run on the mac. Spinning up a good linux VM would not fit the workflow, but Docker for Mac makes it easy.

Face it, a large chunk of the world uses Docker for everything, and in part does not have any way not to. Saying "don't use Docker" is, alas, like saying "Don't use Windows" :-(

Now, for CI, we don't use Mac, we use github actions and Linux, so I don't need to use Docker there. Whew. But I do have to special case my script to use (old) Docker on Mac, and no Docker on Linux.

dkegel-sigsci avatar Dec 07 '20 17:12 dkegel-sigsci