0

Assume I have a physical server with vanilla Ubuntu Server 18.04 LTS where I'll do some minimal configuration adjustments in iptables and /etc/ssh/sshd_config and only install docker.

Using docker I'll be running whatever workloads I need to run and I'll be keeping the host up to date regularly via these commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot now
sudo apt-get autoremove

Should I prefer something other than Ubuntu (e.g Debian, Arch, CentOS) because it'll offer me better performance or better security? Or will sticking to Ubuntu offer me exactly the same performance and security as anything else for my usage scenario?

Edit: I do not care about how large the host O/S is on the server. I'm only looking into facts and figures which confirm whether performance and security are affected.

  • 1
    Pretty broad question, but yes, Ubuntu is filled with lots of things unecessary to your use case, such as snapd etc. If you want a minimal system I suggest choosing Debian (on which Ubuntu is based on) or similar. – Panki Oct 2 '19 at 6:50
  • @Panki Thanks. I believe it's not broad at all since I've described a very specific use case. I've also updated my question with a note that I don't care how large or "bloated" the distro is. – cherouvim Oct 2 '19 at 6:53
  • @Panki ubuntu server has snaps by default? Name me a few if you can. – Rinzwind Oct 2 '19 at 14:41
  • 2
    Being "bloated" is not only about disk space, but about unneeded services running that could have security issues. So you care. – Philippos Oct 3 '19 at 6:46
  • 1
    @Panki I couldn't find snapd running on any of my Ubuntu Server 18.04 LTS servers. It probably does on the Desktop version, but this is unrelated. – cherouvim Oct 5 '19 at 1:23
3

If the only use for your host operating system is to run containers, I recommend running an operating system specifically designed for that, such as Fedora CoreOS. These have a number of benefits compared to a general-purpose operating system such as Ubuntu (in its non-Core varieties):

  • they are typically designed to be immutable, reducing the risk of compromise;
  • updates are largely transparent and atomic;
  • the overhead from the host is minimal, with no extraneous daemons.

The latter is of course achievable in a general-purpose system too, by removing unneeded packages as far as possible. If you want to go down that path, Debian would probably be a better starting point than Ubuntu, since its minimal install is much smaller.

Not the answer you're looking for? Browse other questions tagged or ask your own question.