FROM scratch
COPY this-or-that
LABEL prometheus.port=9100
LABEL prometheus.path=/metrics
EXPOSE 3001
EXPOSE 9100
and nothing breaks.Only feeble component is CA bundle for SSL-related stuff as that by nature is changeable.
FROM scratch
COPY this-or-that
LABEL prometheus.port=9100
LABEL prometheus.path=/metrics
EXPOSE 3001
EXPOSE 9100
and nothing breaks.Only feeble component is CA bundle for SSL-related stuff as that by nature is changeable.
It's not more complex by any stretch
In my case, the bottom bid contracting firm that delivered the code had special logic for windows but otherwise wouldn’t happen on unix based machines.
Sure, but containers don't protect you from that - you're still exposed to differences in the host kernel. For that kind of issue you'd want a full VM rather than a container.
You've gone from being exposed to OS and kernel differences to being exposed only to kernel differences. For most apps, that's acceptable. Others will need to ship VMs. Some will even need to ship bare metal.
It's a tool, not a dogma.
> It's a tool, not a dogma.
The idea that containers are the only or right way to do service orchestration is absolutely dogma, enforced by kubernetes and friends.
I dunno, probably stuff like ulimits and selinux rules that you don't think about until it burns you. Not to mention whatever idiosyncratic configuration your customer might perform.
> [It's] absolutely dogma, enforced by kubernetes and friends.
The dogmatic people are wrong to be dogmatic, but in the context of this particular conversation, I would like to point out - meaning no disrespect - that it is you who is advocating the more maximalist and less pragmatic view.
How so? The thread started with talking about having a statically linked binary (not a specific one with special requirements, but a generic one), and described putting it in a container with a config to expose some ports from it. That seems very much like a dogmatic everything-must-be-a-container position. I'm not arguing for never using containers, I'm arguing for using them where they make sense and not using them where they don't.
If I'm misreading you, then I apologize.
- Check for processes called "sleep", exit if such process exist (or try to kill it).
- Reset $PATH to default value then expect to find a _very_ specific ancient version of system utilities there.
- Create files in /tmp with fixed names. Fail if they already exist. Forget to delete them on failure.
- Walk entire filesystem searching for something. Crash on broken symlinks.
- Enumerate network interfaces. Crash if more than 7 are present.
- Hardcode _both_ specific user name and associated UID.
- Put temp files all over place, including into application directory
- Ignore $HOME and use homedir from /etc/passwd, then create lock/config file under homedir. And you want to run two instance of this app in parallel.
But the code I nicked the example from was actually our internal k8s/docker deployment testing/debug app, so, well, it's in containers by design.
No, containers are not a problem and they don't add any additional problems.