Save to My DOJO
Hi Everyone! Time for the next segment of our ongoing series on container services for MSPs!
Hard to believe we’re going into part 8! I’m really enjoying writing this series and really happy to hear from readers finding this content so useful! As you’ve seen this is an extensive topic, with lots of moving pieces, and operational differences from how things have been done on the ops side these last 5 to 10 years.
So far, we’ve been talking extensively about Docker, the core container engine, not only in Windows but in other operating systems the world over. We’ve talked about Installation on Windows. We’ve talked about persistent storage, networking and quite a bit more. However, we’re far from done!
In this segment, we’re going to show you how you can set up a Linux server to act as a container host. Remember, Linux is a supported platform for Docker containers and there are reasons why you’d want to use a Linux container host. First, let’s see where we’ve been with this series thus far.
The Definitive Guide to Containers for MSPs
Part 1 – What are Containers
Part 2 – Platforms for Running Containerized Workloads
Part 3 – Introduction to Docker
Part 4 – 4 Pro Tips for Working with Docker
Part 5 – How to Run Linux Containers on Windows Server 2019
Part 6 – How to Create Persistent Docker Containers
Part 7 – Docker Container Networking – Part 1
Where is this Series Headed?
Again, this is a very broad topic, so expect A LOT more on this subject. While much of what we’ve discussed so far has been very technical, we’ll be incorporating more MSP focused tie-ins as we move along. To fully grasp them you need a strong foundation of the essentials first, and the series thus far has been designed to help you get there.
In a few segments, we’ll likely get into some pricing and support discussion before we move on to container orchestrators and the added complexity that entails.
Anyway, let’s talk Linux Container Hosts!
Why Would I Use a Linux Container Host?
I see this question come up quite a bit when I start talking about Linux-based container hosts. The interest in containers is really exploding in part because Windows system admins can now run it on their platform, and given their comfort level with Microsoft’s stack, many wonder why they should bother running it on Linux. Here are a few reasons why.
- Open Source – As most Linux Distributions are Open Source, there are no licensing requirements. Hence, lower costs. It’s especially a good option if you’re still in the testing stages with a customer and they don’t have Windows licenses to spare.
- Maturity – I’m not saying that Docker on Windows isn’t a mature product. I’m just saying that it’s more so on Linux. Docker has been running on Linux much longer than it has on Windows, and as such, you’ll have access to newer features in some cases, and you’ll likely find the experience to be less buggy as of the time of this writing.
- You Need Support for Kubernetes – If you’ve been tracking this series you know that Kubernetes is a container orchestrator, which we’ll be covering much later in this series. While there is currently beta support for Kubernetes and Windows Server 2019, you’ll need to use Linux Container hosts if you want to use it in production today.
Now that we’ve answered the why, let’s talk about HOW.
How to Install Docker on Linux
Thankfully this isn’t an overly complex process. Even if you have little Linux knowledge it’s fairly doable. It really comes down to how current you want to be and the flavor of Linux that you’re using. If you don’t mind being a little behind, the simplest thing is to just use your distributions package manager. There is a slight delay in using this method as the official bits coming from docker have to be tested and re-packaged by the various package maintainers in the communities for the various distributions. There isn’t a tight time table for this process, but it works pretty well for production uses and it builds in a bit more of a vetting process before it hits your production machines.
You could install docker with this method by simply using the following commands:
Debian
su
apt-get install docker
Ubuntu
sudo apt-get install docker
OpenSUSE
sudo zypper install docker
Fedora
sudo yum install docker
Again, this installs the version that is installed in your distribution’s package manager. If you need the latest and greatest and want to keep up really closely with Docker’s development cycle, there are some extra more complex steps that are laid out in the links below:
Once you’ve completed the installation process, interacting with Docker is exactly the same as it is in the previous segments we’ve discussed. For example, below I have an OpenSUSE container host launching a basic hello world container. You’ll note that the syntax and behavior are exactly the same as it is on a Windows Container host.
There you have it! Simple and quick installation and you have a ready to go Linux Container host.
Wrap-Up
I know this segment was a bit on the shorter side, but we had to fill the Linux container host gap. Regardless of your needs, you now have everything you need to set up the container host of your choice in your test environment. Stay tuned for more container goodness in a future segment!
Also, have you installed docker on Linux before? How was the experience? What distro did you use? Let us know in the comments section below! We want to hear!
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!