2 ms·
With a 12 factor app, you don't need virtualization. The entire app is stateless, all state is pushed off to various resources. All you have to do is pull the r
by vinceguidry 13y ago
With a 12 factor app, you don't need virtualization. The entire app is stateless, all state is pushed off to various resources. All you have to do is pull the repo and run the service.
12 factor is not a requirement for Docker. You're perfectly free to violate 12 factor by storing state in the file system, config in your code. Heroku makes you implement quite a bit of 12 factor through their ephemeral filesystem, but it cannot enforce following of the entire spec.
Virtualization, in my opinion, has become a crutch we lean on to avoid having to restructure apps. If you need, say, a cron job, instead of doing it the 12 factor way and using beanstalkd, you'll just run cron on your container. (not sure if that's possible but you get the idea)
Virtualization and 12 factor aren't quite orthogonal, they do overlap a bit. The former is an 'easy' solution, you just build your app however you like and as long as it will run in a container, you're fine. The latter is much harder, you have to make your app totally stateless.
- derefr 13y agoI've never seen Docker/LXC as a "virtualization" solution; it's an isolation tool, to firewall off exploited services from their siblings and hosts (which then allows things like PaaS multitenancy.) Used in that sense--where anything that breaks isolation (like host-mounted volumes) is disallowed--Docker does indeed require 12-factor-structured apps, to do anything of use.