-
Notifications
You must be signed in to change notification settings - Fork 8
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
Running Docker inside runcvm #21
Comments
That's an interesting use-case and it should be a viable one. Running dockerd inside RunCVM is supported. I've looked over the Dockerfile and on first impressions it looks fine. What exact |
I fixed the iptables issue by installing kmod, but it still seems somewhat unstable. Maybe there are more recommendations when it comes to running Docker inside RunCVM? |
Something I noticed is that if no resource limits are set, it defaults to some very strict values? I think for RAM its only 512MB. I thought it would do the opposite, no limits/access to all resources. That was one of the issues as the VM was killing the processes inside due to OOM. |
Weird, even after setting a limit of 32GB of RAM, the container seems to only use up to 6GB RAM and the process inside still gets killed due to OOM. Not sure if its a bug or not. And another question is what happens if I want to run 2 of these containers? Host has enough RAM to do so, but does the VM reserve the full amount or as long as its not fully used I can run as many VMs with memory set to 32GB? |
A VM needs its memory allowance to be specified. If you don't specify with Check out the Docker/Systemd example in the README. It uses 2g memory which has worked fine in testing for running small containers within the VM. Of course the amount of memory you need to allocate depends on what containers you plan to run inside the VM, and their memory requirements. Please keep me apprised of your evolving |
So its possible to run 2 containers with -m 8GB on a host with 8GB RAM total, assuming the processes inside the VMs use only 1GB each? Same goes for CPU? |
That's a great question but one I can't answer right now. If you want to run two RunCVM VMs, I would (for now) recommend finding out the minimum memory requirement for one, and specifying that for each one and assume KVM allocates the entire needed host memory for each one at launch time. That is the conservative assumption. Of course, feel free to test it the other way. |
I was wondering if you have advice on what is necessary to make docker run properly inside runcvm.
I am using the standard
FROM ubuntu:22.04
image but docker always fails to startSince you already have a small mention of running Docker inside the VM, maybe you could expand on it a bit to better understand how to get it fully operational?
The end goal is to use runcvm to run github runners inside, which in turn run docker containers as part of CI workflows.
Full dockerfile https://github.com/jimaek/github-runner-dockerfile
Thanks!
The text was updated successfully, but these errors were encountered: