3 ms·
Some context to my comment, last time I was doing app distribution I used the contemporary best practice which was SVN. I’ve read a dozen articles on the theory
by user3939382 6y ago
Some context to my comment, last time I was doing app distribution I used the contemporary best practice which was SVN. I’ve read a dozen articles on the theory of Docker vs VM but still don’t get it. Apparently it saves resources by not replicating the whole OS. Do everyone’s apps really not rely on the specific kernel at all? Even in i.e. PHP apps I usually have binaries tied in that are compiled for the kernel I’ve developed on.
Containers are peripheral to my work so I don’t understand but I’m curious.
- VWWHFSfQ 6y agowhat kind of php app are you running that requires to be linked against a specific linux kernel
- user3939382 6y agoLet's say I integrate with a CLI utility, which comes up. Docker wouldn't work? If the answer is no I think I'd say I understand the theory better. Unless docker is providing some kind of universal kernel API or something?
- dbaggerman 6y agoIn that case you would bundle a copy of the CLI utility into your docker container, with the correct version. This also applies to any system libraries your code might be compiled against. Things like shared libraries or CLI utilities are part of the "operating system", but not part of the "kernel". This does mean that you end up with multiple copies of the same utilities and libraries on the system - although docker does have a mechanism to avoid duplication between different docker containers. It also means that if you take your docker container and move it over to a different system with a newer operating system (or a different distribution) all the parts of the operating system it cares about come with it. The Linux kernel - the part that gets shared between containers - is mostly just responsible for process and memory management, networking and interacting with the computer hardware.
- chub500 6y agoDocker takes advantage of various linux sandboxing features. On a linux bare metal host it's just a combination of namespaces and resource constraints (cgroups) whereas on other platforms it will have to be the above within a bonafide VM running a linux kernel. The general rule is that linux maintains backward compatability even in ABI so as long as the host kernel is the same or newer than the image requirements it should just work. Things wont work for example if your image requires iouring (a brand new syscall interface) but your host OS is running 4.x (doesn't map iouring syscalls to anything).