5 ms·
So, this is an awkward question to ask (coming from the Windows side of things). I see all these self hosted projects, think "neat!", then want to spin them up
by kotaKat 3y ago
So, this is an awkward question to ask (coming from the Windows side of things).
I see all these self hosted projects, think "neat!", then want to spin them up and immediately get a little lost because I honestly haven't really touched Docker.
If I want to set up something from nothing (eg, I'm spinning up a VM for the first time on some ESXi metal to run something), what do I start with as a base OS these days to "just run Docker" without much else?
I know I'm kind of going slightly against the model of Docker here, but when you also don't have anything at all to base from...
- bo0tzz 3y agoThere are all kinds of fancy container OS distros and such, but if you just want to get going, just go with good old ubuntu or debian.
- j45 3y agoDebian for main host is ideal. Proxmox runs on it too. Easy to run either in a container
- frameset 3y agoDebian is a popular choice, as is Ubuntu Server LTS. I've chosen Ubuntu Server LTS as my base. It's a nice compromise between the rock solid stability of Debian, whilst allowing for some more recent sofftware package releases in the repositories. If you'd like to dive in more as a newbie to self hosted docker containers for personal software, check out https://docs.linuxserver.io/general/containers-101/ https://docs.linuxserver.io/general/containers-101/ These guys package popular software projects in a reliable format, and they have some good guides to get started.
- doubled112 3y ago> whilst allowing for some more recent sofftware package releases in the repositories That really depends on how the Debian and Ubuntu releases line up. A lot of the packages in Debian 12 are more current than 22.04, because Debian 12 was released in 2023. That will change this month, because Ubuntu's newest LTS will be from this month. Debian stable isn't as old on release as it used to be.
- quickslowdown 3y agoI'm using Ubuntu less and less, Debian is so incredibly stable & uses so little RAM & CPU, and I don't have to de-snap the OS.
- blackfawn 3y agoAgreed! If I end up having to use Ubuntu, my first command is generally `sudo apt purge snapd unattended-upgrades`
- quickslowdown 3y agoI have some ansible playbooks for setting up my "standards" on new machines. The very first playbook that runs, first step, checks for os_family = "Ubuntu" and runs the snap remove & purge command!
- Fire-Dragon-DoL 3y agoI had to drop ubuntu because of their stance of having unattended upgrades enabled by default, this in turns translates to ansible failing every time when I first run it on a brand new server, because the first thing it does is installing updates. It's really bad from an automation perspective
- mkl 3y agoIt's frustrating that the unattended upgrades apply to every package, but luckily you can blacklist things that cause problems. I've had problems with NVidia tools being upgraded before the driver is (since I rarely restart), and don't like upgrades that require restarts, so I do this first thing: sudoedit /etc/apt/apt.conf.d/50unattended-upgrades In Unattended-Upgrade::Package-Blacklist, add "linux-"; "nvidia-"; "libnvidia-"; "xserver-"; When I do a planned restart, I run apt dist-upgrade just before it to do the updates.
- Fire-Dragon-DoL 3y agoThat's fine on a desktop machine, the problem on a server machine is that as soon as I start the server, I will probably be in automation mode and I definitely need to run `apt` for some reason. But APT is unavailable, so everything is blocked until unattended upgrades are done. So much for being "unattended", I have to attend to start the next script.
- Saris 3y agoDebian is the simplest option I think. It's easy to install and use, and there are lots of guides that are Debian focused out there.
- diath 3y agoI'm not sure what are you asking, is the question "what do I need on a fresh system to start running containers"? In which case all you need is to install the docker packages from the repositories in the distro of your choice (Debian Stable is a good starter for servers). Or are you asking what do you base your docker container on?
- nolongerthere 3y agoSo as of the Broadcom acquisition, ESXi is no longer the recommended route for anything, but especially not personal self hosted projects. Instead, proxmox is a good, free, open source hypervisor alternative. One nice thing about it is that because it’s really linux under the hood, you can just directly host docker containers in proxmox. I would say that is the recommended route if you have a spare machine available. If you don't have a spare machine available and want to host on your machine, then you can use docker on Windows with WSL, or you can create a Ubuntu VM, and use that. If you have no linux experience I’d recommend going the Ubuntu desktop route for a VM. While Ubuntu server is lightweight, it’s also a huge learning curve going from a full service GUI to foreign CLI-only OS, that has many fewer guardrails. I also was only familiar with Windows, and found Ubuntu server to be kinda overwhelming. It’s kinda like being dropped in the middle of the pacific and told to swim to the nearest shore, but you don’t have a GPS or food, and only the stars to guide you. After spending a few months with desktop I was able to graduate to cli only, tho I do still sometimes pine for that familiar GUI.
- mdaniel 3y ago> Instead, proxmox is a good, free, open source hypervisor alternative. I got the impression from all their "enterprise" branding that it wasn't, however based your claim I went digging and found that it's AGPLv3 and they do have a CLA but they allege the submitter retains the copyright, which my IANAL interpretation should(!) prevent rug pulls https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright https://pve.proxmox.com/wiki/Developer_Documentation#Softwar...
- hoherd 3y agoI don't use Windows, so this answer is coming from the total other end of the spectrum from you and I have never done this, but it seems like running those linux docker containers in Windows and not inside a VM that you have to manage is your best option. https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-10-linux https://learn.microsoft.com/en-us/virtualization/windowscont...
- hiAndrewQuinn 3y agoI argued in https://hiandrewquinn.github.io/til-site/posts/the-unreasonable-effectiveness-of-vms-in-hacker-pedagogy/ https://hiandrewquinn.github.io/til-site/posts/the-unreasona... that the way to go in this situation is to spin up a Debian VM in Virtualbox with Vagrant, and take it from there. Start by learning to install Docker from within the Debian VM, then the world is your oyster!
- j45 3y agoProxmox with docker inside
- j45 3y agoDon’t use docker alone Install something like proxmox and then if you need some docker you can devote a few containers. Yes that can mean vm inside of VMs, but home labs rarely do anything that performance demanding that this is an issue. Something like proxmox will make so much of it point and click, it nearly can do everything needed out of the box (including backups, mirroring), if you prefer to start that way and it’s easy to set and forget. Lots of videos on YouTube too.
- Elbrus 3y ago> what do I start with as a base OS these days IMO, there are two primary options: — Rocky Linux (or AlmaLinux) if you prefer a “bit more corporate” flavor after getting used to Windows; — Debian if you'd like to get “more community” one. Once you're somehow familiar with one of these, you should be able to figure out what else you may want to try.
- mickeyfrac 3y agoI was in exactly your position a couple of months ago and have just got my first apps running this week! Im a web developer so had a bit of experience with containers, cli and linux but only basic web related stuff. Ill detail my journey and then let others tell you how wrong I am. I bought a thinkcenter m715q for $200ish which was suggested as a good budget starting machine. There's lots of info about this on https://reddit.com/r/homelab https://reddit.com/r/homelab , https://reddit.com/r/selfhosted https://reddit.com/r/selfhosted and https://www.servethehome.com https://www.servethehome.com I installed ubuntu and had a play around but then decided proxmox seemed like the way to go for what I wanted to so. So I watched a range of youtubers https://www.youtube.com/@christianlempa https://www.youtube.com/@christianlempa https://www.youtube.com/@TechnoTim https://www.youtube.com/@TechnoTim https://www.youtube.com/@CraftComputing https://www.youtube.com/@CraftComputing who all have different series on this and related topics. Basically you burn the proxmox iso onto USB, plug it in, install it on the computer and its ready to go (obviously watch a few videos!). You need to access Proxmox from another computer on the same network through the IP address you get at the end of install. So if your router/gateway is say 198.168.0.1 you might set Proxmox as 198.168.0.99. Im still figuring the best practices on this out as obviously security is a major factor... Actually you can use a single computer but need to do something like this https://pve.proxmox.com/wiki/Developer_Workstations_with_Proxmox_VE_and_X11 https://pve.proxmox.com/wiki/Developer_Workstations_with_Pro... Which worked for me but its actually more convenient to use another comp as you want to be using your normal environment to use the services. Once its up you browse to it, sign in and its ready to go. I got started by setting up plex by using this site: https://tteck.github.io/Proxmox/ https://tteck.github.io/Proxmox/ which gives you a single command to run an install script of whatever you want to install. It will install it as a LXC Container which is like Docker but less overhead. Or you can create VMs and run docker in them. This is next weeks job for me. Each container gets created as a new service with its own IP address on the network. To expose them externally creates security risks if you don't know what you are doing. So I chose to use Cloudflare Tunnels which was super easy but I use CF daily. Now i have a working Plex server at plex.<mydomain>.com and a Mattermost server at chat.<mydomain>.com ! Its super fun and you just nuke stuff if it doesnt work. Proxmox UI is easy to understand. My biggest issue was understanding how to connect external drives and share them with the containers permanently. So understanding mounting drives, permissions in linux in general and then in Proxmox https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_poi... I have a massive amount to learn before I feel comfortable and secure. But totally worth the time spent so far and not as hard as expected once I decided to go down the Proxmox direction.