4 ms·
But 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
by phire 5y ago
But 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.