by ryanianian · 4y ago · 0 comments
I honestly don't understand what's going on here. I thought we turned to Docker/containers because VMs were too heavy? Now we've got VMs that run Docker? (Not trying to be dense - what is the advantage?)
VMs are lightweight now, though containers are lighter still; ref: https://fly.io/blog/sandboxing-and-workload-isolation/
Btw, Docker wasn't about security as much as it was about "package once, run anywhere".
> Now we've got VMs that run Docker?
Fly.io doesn't run Docker as-is, but rather unpacks it and runs it in a guest through containerd; ref: https://fly.io/blog/docker-without-docker/
> ...what is the advantage?
This has been discussed numerous times, and here's a link to one such discussion: https://news.ycombinator.com/item?id=26747701
Read also: https://gruchalski.com/posts/2021-03-03-thoughts-on-creating...
The tooling for proper VM creation on the other hand is in the stone-age comparatively--there are just a few tools like packer or a frankenstein of ansible scripts and neither are as nice or easy as Dockerfile creation.
Docker is much, much simpler. Write a Dockerfile that's mostly just bash or shell code. Build and run in seconds to immediately see the results. Once it's working push the container image to a public registry and you can distribute it to anything.
Why run Docker in VMs instead of using VM images? Because Docker's build tools are more popular than Packer-style tooling.
It's a moot point, because this is a solved problem. Use containers for single-tenant workloads; use micro-VMs, whichever flavor you like best, for multi-tenant.
If you're reading this and have big thoughts on how we might do GPUs at Fly.io without keeping us up at night about security, you should reach out; we're hiring.
They provide any extra layer of indirection which helps with usual exploit attempts, but also introduce new scope. We've had exploits specifically targeting the namespaces API already.
Well, isn't that what happens when you put a shield into place? Someone tries to break it. Why have people concluded that it can never be made properly secure?
Why run daemons in containers instead of using proper process isolation? Because containers absolve the system administrator from understanding their systems.
The win would be in the attack surface area. For hypervisors there's a good layer of abstraction to pivot over, whereas with containers it's a much thinner wall.
The container kernel surface is just insane by comparison.