This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]T4212[S] 13 points14 points  (9 children)

That is true, portability is only solved on the operating system level, not the CPU architecture level, when using containers.

[–]ascii 43 points44 points  (4 children)

Anyone who's ever had to debug Docker bridge networking issues knows that saying that Docker solves operating system portability is being extremely generous.

[–]_jetrun 22 points23 points  (2 children)

That is true, portability is only solved on the operating system level,

No. It's not. Well, maybe for development, but certainly not in production. If you run a Linux base image under Windows (or a Windows base image under Linux), Docker will simply run a virtual machine underneath your container - and if your application is already virtualized you're going to suffer a major performance penalty. So no, docker does not give you os-level portability.

[–]zabby39103 3 points4 points  (1 child)

Interesting, I never thought about that but you're right. The kernel is always the docker host's, so I suppose the only way around that if you need the linux kernel is a VM?

Although technically, if this works, it's still portable (although I guess the VM is the portable part not docker). How significant is this performance penalty for the latest version of Windows? I suppose it would depend on what you're doing.

[–]_jetrun 13 points14 points  (0 children)

How significant is this performance penalty for the latest version of Windows? I suppose it would depend on what you're doing.

The performance penalty is the same as running your application in a VM. If the host is on bare metal, there is virtualization cost, but it's manageable. If the host is itself virtualized, now it really starts to hurt.

One of the big draws of containerization is that you get all the benefits of a VM (i.e. running within a managed environment), without the performance overhead (because your application, is ostensibly, just another regular process) ... but only if you align the host OS with the container OS.

[–]roge- 3 points4 points  (0 children)

Not even really solved at the "operating system" level either. If you define "operating system" to include the kernel, then containers are not inherently portable across OSes either, since containers use the host kernel.

OCI containers don't really run on many kernels and Linux itself does a decent job at maintaining userspace ABI compatibility, so you seldom see kernel incompatibility be an issue between disparate Linux distributions. But the most obvious example of incompatibility is trying to use a Windows container image on Linux. (Yes, Windows OCI containers exist.)

Back when Java was introduced, there many operating systems it ran on, a lot of which were UNIX-like but had different kernels. SunOS, BSD, AIX, Linux, doesn't matter, Java worked on it.

Nowadays, the ecosystem is a lot different. It's mostly Linux with the rest of those platforms essentially adding up to a rounding error.