Can I Run a VM Inside a Docker Container for CI Jobs?

0
10
Asked By TechieTurtle729 On

Hey everyone! I have a bit of a technical question. Is it actually feasible to run a virtual machine (VM) inside a Docker container for continuous integration (CI) purposes in GitLab? I'm currently working on a FUSE project, and I want to set up CI that spins up a VM to run integration tests and then sends the results back to GitLab. My main concern is avoiding the need for privileged containers during CI jobs, as going through the approval process for even small changes can be really frustrating. I get that Docker uses the host's kernel and isn't fully virtualized, so I'm wondering if this is a good approach or if there are better alternatives. I'd love to hear your thoughts and suggestions. Thanks!

2 Answers

Answered By CodeNinja777 On

Have you considered just creating more containers for the processes needed for your integration tests? That might be a lot more straightforward than trying to run a VM inside Docker.

FUSEFan123 -

I can't use a FUSE filesystem without a privileged container though, since it needs access to /dev/fuse.

Answered By DevOpsDude88 On

To run hardware-assisted VMs, you’ll definitely need a privileged container. What’s the specific problem that's driving you toward using a VM? Maybe we can find a different solution.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.