3 ms·
I see Docker listed as a requirement, and I am familiar with Docker. The repo mentions using Firecracker, a microVM that I've only ever heard of. What is the re
by politelemon 4y ago
I see Docker listed as a requirement, and I am familiar with Docker. The repo mentions using Firecracker, a microVM that I've only ever heard of. What is the relation, if any, between these two? Is this a wrong question: if this uses Firecracker why is Docker involved?
- guywithabowtie 4y agoFirecracker is the VM powering AWS Lambda, it is maintained by Amazon. It is pretty decent and popular in certain areas. I believe Fly.io is using them behind them too.
- guywithabowtie 4y agoIt has special optimizations for reducing cold start.
- hugodutka 4y agoWe use Firecracker to provider greater isolation and more capabilities in dev envs. For example, one thing you often want in your dev env is to run Docker containers, but to do that you need some permissions that usually only a root user has. If we used Docker to virtualize dev envs then we would have several options to enable that: - make dev envs privileged containers, effectively giving any random user root control over the machine where Hocus is hosted - mount the Docker agent from host into the container, but that also allows the user to gain root control over the host machine - use Linux user namespaces, and give you a root user with limited capabilities inside your dev env. That's actually what Gitpod - another Github Codespaces alternative - does. That root can't do everything though. It can't run Kubernetes, LocalStack, or the Elastic stack, because it can't modify some system limits. A dev env backed by Firecracker is a full-fledged virtual machine that has none of the aforementioned drawbacks. It has some performance tradeoffs though, but we are working to minimize them as much as possible.
- politelemon 4y agoOK thanks for that. I am tinkering with it and noticed that it makes use of KVM and just found out that WSL2 has KVM support so I'm going to give it a try there and see what breaks, ha! https://serverfault.com/questions/1043441/how-to-run-kvm-nested-in-wsl2-or-vmware/1115773#1115773 https://serverfault.com/questions/1043441/how-to-run-kvm-nes...
- cube2222 4y agoDocker is used for running the control plane.
- hugodutka 4y agoThat's right! Docker is used to simplify deployment, so other components, like the agent, are also containerized.