4 ms·
This is supposed to run inside of a container. Why would you want sshd inside of a container?
by acomar 9y ago
This is supposed to run inside of a container. Why would you want sshd inside of a container?
- sofaofthedamned 9y agoIt isn't clear afaik. Maybe i'd like this as an alternative to CoreOS or whatever for my k8s nodes? EDIT: Good point, you're right, it has no init system etc and is meant to be used in a container. Point conceded :)
- hosh 9y agoI wouldn't be surprised if Ubuntu started a project similar to Redhat Atomic (and now CoreOS/ContainerOS). On GKE, one advantage of using Ubuntu as the node OS is you can get access to Sysdig or OpenEBS.
- sofaofthedamned 9y agoWe've moved at work to mainly Alpine based k8s containers, which is awesome, but you lose a lot of debug ability. Thinking about it - with Linux KSM the overhead of full-fat containers based on Ubuntu (for example) isn't massive. We may have to look at the metrics I reckon.
- dustinkirkland 9y agoYou're looking for Ubuntu Core.
- hosh 9y agoLooking at Ubuntu Core, not sure it is doing the same kind of things that CoreOS ContainerOS, Google's ContainerOS, and Redhat Atomic is doing.
- deleted 9y ago[deleted]
- unethical_ban 9y agoNot arguing that point for this image, but I use containers as lightweight VMs, not only as stateless-horizontally-scalable-try-to-be-google app servers.
- tomc1985 9y agoIt's stupid that you've been downvoted. It is so tiresome to see people ask such useless questions like "what? you want to use this thing in some way that my tiny brain cannot envision? what is this madness?"
- lox 9y agoHis reply was snarky and created a false dichotomy. The 90% usecase exists in between “lightweight VM’s” and google scale horizontal app deployment. Consider that the former is just as much an outlier as the latter. This post is about a pragmatic minimal Ubuntu base image, which would meet neither case well.
- unethical_ban 9y agoIt was snarky. But there is a dichotomy: It's either stateless or stateful. Either I'm supposed to SSH to it or I'm supposed to destroy and redeploy.
- lox 9y agoAgain, consider that you are creating this dichotomy, not the tools, or vast majority of practitioners in this space. Docker comes with (and encourages) lots of ways to persist state, as do orchestration environments like Kubernetes and ECS and you should choose the approach that suits the problem you are solving. If you want containers as lightweight VM's, there are a ton of ways to do that and they are actively supported. I'm reluctant to get off-topic here, because the narrative relating to the actual post should be "Does it makes sense to have openssh in a minimal ubuntu base image", to which the answer is "No, obviously".
- 9y ago
- pikchurn 9y agoI use containers as lightweight VMs in many places. Generally I see this as a way to get a minimal install that other tools can then configure appropriately, with up to date packages fetched from upstream mirrors directly, instead of installed from CD and then upgraded. I currently use packer.io to script the creation of a bunch of server images, and for ubuntu I've missed the "minimal install CD" that other distros have. Instead packer has to download a 800MB CD image, in order to install only a few hundred megabytes of uncompressed packages in a bare-bones install, which is then provisioned using some orchestration tool that at its heart uses ssh to login to the virtual machine. Not having SSH means you need to add in some sort of serial-attach step to manually install sshd, or hook into the install scripts to download sshd as part of the install or whatever. Either way that's additional custom work that is probably common to a great many use cases.
- isostatic 9y agoJust do a netboot with a preseed file (have your own local cache - either with apt-cacher or something more independent) Our server preseed has the following line d-i pkgsel/include string openssh-server build-essential iperf htop screen sysstat vim-nox And a couple of internal packages which have their own dependencies (including lldp, snmpd etc) which do a variety of things including user management (active directory based), automatic registration into our asset database and monitoring systems
- moondev 9y agoThis is meant as a base image for containers. There's not even a kernel or init
- verst 9y agoSo why not build your own version with a SSH daemon if you really need it? I don't think most people need the SSH daemon in their container image. Your Dockerfile could be something like this: FROM ubuntu:bionic RUN sudo apt-get install openssh-server -y && sudo service ssh restart These are definitely not the complete steps for setting up SSHd but you get the idea.
- acomar 9y ago