5 ms·
this is less true these days w/ slim docker images that don't include any editors by default
by emef 5y ago
this is less true these days w/ slim docker images that don't include any editors by default
- dijit 5y agoDoesn’t POSIX designate vi as a requirement? https://ieeexplore.ieee.org/document/6880751 https://ieeexplore.ieee.org/document/6880751
- yakubin 5y agoPOSIX doesn't say anything about containers.
- dijit 5y agoBut your containers may be a bit weird if their environment isn’t POSIX. Like if you removed the “cd” command or the ability to read environment variables. “Containers” is any definition you want, but surely they’re built to some standard. PS: I do make “from scratch” images a lot, I know you don’t “need” to have any utilities at all, but I’m fairly certain that a lot of software expects the “OS” to be POSIX.
- yakubin 5y agoI don't know what you mean. Linux containers don't contain operating systems. They contain processes. POSIX describes operating systems. Every Linux process can read environment variables. They are contained in its address space. "cd" is a shell built-in. When there is no shell, there is no "cd". Not providing access to a shell sounds like great security practice tbh. Your applications shouldn't be using it anyway (they should create new processes directly).
- messe 5y agoThis is just being obtuse for the sake of it. Yes, technically nothing in the notion of a container necessitates that; containers are just a form of namespacing. Have a gold star for understanding that. But the fact is: the vast majority of containers in use are going to be based on some minimal OS image, which is what the commenter was referring to.
- jrockway 5y agoPeople use minimal OS images when they absolutely have to, but the ideal case is just your binary sitting there all alone. (Sometimes you need the tzdata files, SSL certificates, and other support files. But rarely a shell.)
- messe 5y agoI agree that the ideal case is just a single binary with minimal supporting data, but people using OS images is certainly the norm not the exception. To suggest otherwise is ludicrous.
- yissp 5y agoMost Linux distros aren't 100% posix compliant as far as I know.
- rascul 5y agoLooks like EulerOS is the only one certified (which isn't the same as compliant). https://www.opengroup.org/openbrand/register/brand3622.htm https://www.opengroup.org/openbrand/register/brand3622.htm
- privacyking 5y agoNot sure, but I've logged into many terminals before and not one of them didn't have vi installed. Have found plenty without nano or vim though.
- wahern 5y agovi is specified by POSIX, but (at least currently) it's marked as a User Portability Utilities (UP) extension, which is optional. It is required for XSI conformance, which mandates other extensions like C-Language Development Utilities (CD). But XSI itself is mostly legacy SysV stuff; the more widely supported parts were rolled into POSIX proper and either made a requirement or grouped into their own optional extension. In general, most utilities and functions primarily used interactively are optional in POSIX.