3 ms·
Containers never solved the permission model. They solved the packaging and idempotency problem. I really dislike when people assume containers give them secur
by dijit 5y ago
Containers never solved the permission model. They solved the packaging and idempotency problem.
I really dislike when people assume containers give them security, it’s the wrong thing to think about.
Containers allowed us to deploy reproducibly, that’s powerful.
- foxhill 5y ago> I really dislike when people assume containers give them security, it’s the wrong thing to think about. to be fair, there is lots of published text around suggesting that this _is_ the case. many junior to semi-experienced engineers i've known have at some point thought it's plausible to "ssh into" a container. they're seen as light-weight VMs, not as what they are - processes. > Containers allowed us to deploy reproducibly, that’s powerful. and it was done in the most "to bake an apple pie from scratch, you must first create the universe" approach.
- mikeyjk 5y agoIt is possible to do that though. I'm perhaps getting too caught up on 'plausible'.
- phire 5y agoBut you can ssh into a container. You just need to install sshd and launch it. You also need to create a user and set a password if you want to actually log in. Why? Because containers aren't a single process. It's a group of processes sharing a namespace. And you can totally use a container as a light-weight VM. While most containers have bash or a your application as pid 1, there is nothing stopping you launching a proper initrd as pid 1 and it will act much like a proper OS. Though, just because you can, doesn't mean you should.
- otterley 5y agoI think you mean init, not initrd. An initrd is a RAM disk image loaded by Linux containing kernel file system and network drivers and is typically used to help minimize the size of the main kernel image.
- otabdeveloper4 5y agoAbsolutely true. Docker replaced .tar.gz and .rpm, not chroots. Most of the time the chroot functionality of Docker is a hindrance, not a feature. We need chroots because we still haven't figured out packaging properly. (Maybe Nix will eventually solve this problem properly; some sort of docker-compose equivalent for managing systemd services is lacking at the moment.)
- catern 5y agoEr, just as a historical note, one of the primary uses of chroots was for packaging. Just like how Docker does it. That, in a sense, was even the original motivation. The security usage of chroots was a later innovation.
- zajio1am 5y ago> Containers never solved the permission model. They solved the packaging and idempotency problem Disagree. Containers are primarily about separation and decoupling. Multiple services on one server often have plenty of ways to interact and see each other and are interdependent in non-trivial ways (e.g. if you want to upgrade the OS, you upgrade it for all services together). Services running each in its own container provides separation by default. OTOH, containers as a technology has nothing to do with packaging, reproducibility and deployment. Just these changes arrived together (e.g. with Docker) so they are often associated, but you can have e.g. LXC containers that can be managed in the same way as traditional servers (by ssh into a container).
- dijit 5y agoLXC, freebsd jails & Solaris zones et al. are not the same as docker containers though. The former were built with security in mind. The latter was most assuredly not.
- cryptonector 5y agoI mean, containers can provide isolation. Linux has had a hard time getting that to be reliable because it started with the wrong model: building containers subtractively rather than additively. Though even starting with the right model, until you have isolation for every last bit of shared context that the OS provides (harder to identify than it may seem at first blush!) you won't have a complete solution. And yes, software-based containers will tend to have some leakage. Even sharing hardware with hardware isolation features might not be enough (hello row hammer). It would be good to have containers aim to provide the maximum possible isolation.