In our previous article, we looked at installing Docker via an LXC Container in our Proxmox Homelab. This article will be an alternative to that article as wo only need one option to run Docker, with this article focussing on running docker in a full Virtual Machine. The choice of which to use is up to each user (check out the differences between LXC and VM)
As we previously looked at what Docker is and how it works, we can summarise it as a way for apps and services to be packed into a container in such a way that it will always run exactly the same. This is due to the app or services’ dependencies, code and executables being contained in the package, meaning it will be the same everywhere we run it. Docker is also a type of virtualisation (as well as containerisation), so yes, it is a lot like Proxmox, although Proxmox has more functionalities and can create full Virtual Machines as we are doing today.
Step 1: Get the Docker VM Command
Although it is possible to create and VM you want, with it’s own Operating system ISO (like we did in our first VM), today we are going to take a shortcut and use our good old helper-scripts.com again. This will simplify the deployment process a lot and make it easier to understand. Firstly, go to helper-scripts.com and search for Docker. You will see two options, one for a VM and one for an LXC. Today we are going for the VM option. Open it. You will see the command we need to run, as well as default credentials and default resource values. We are going to change this default resource values during installation today, but remember that all of these values can be changed after install as well. The only value that is fixed, is the container/VM ID.
Step 2: Set up the Docker VM
Once you have the command copied, open your Proxmox web interface and log in. In the left navigation pane expand Datacenter and select the Proxmox node you want to create the VM on. Once selected, in the middle navigation pane, click
. Paste the command from helper-scripts.com and press enter. The installation process will being and we will go through a couple of steps:
The installation will commence and take a bit of time to complete. Once done, we will be able to change the disk size allocation of this VM, seeing as we did not get that option with the Advanced Settings
Conclusion
We have now gone through the options to get Docker installed on a VM as well as running in an LXC Container. Whichever option you choose, we can now start deploying Docker Containers to our Homelab. This enables us to run a myriad of apps and services at home whoch would normally cost a subscription fee, or risk our data being leaked. Running our services and apps at home ensures privacy and data safety, is free, and above all is a lot of fun! We hope you are enjoying our Build your own homelab series so far, stay tuned for a lot more instalments of the series.




















