Recently I’ve been playing with containers a little bit in my lab. Today I’m going to show you how to get a Docker engine running on a CentOS 7 VM running on an ESXi host. It’s surprisingly easy!
First, what is Docker? It’s an engine that lays on top of an existing host OS and basically removes the “Guest OS” abstraction layer from the mix. This is good because the Guest OS is a big resource hog when you start having several of them per host:
(I stole this from the Docker site. Check it out there as it gives a much more in depth look @ the technology)
So what does this mean? Is this (potentially) bad news for VMware and MicroSoft?
Short answer: yes.
Long answer: Yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesssssssssssssssssssssssssssssssssssssssssssss*
*VMware and MS are working on projects to get in on the containery goodness, so I won’t speak about that here. Instead I’m going to walk through how to set up your first Docker engine ON CentOS ON ESXi in your existing vSphere environment.
-
Have a vSphere environment 😉
- See my homelab articles if you need help with this part
- Download CentOS 7 ISO (I grabbed the minimal ISO because I want more exposure to the CLI & learning how to do things manually really brings it home for me).
-
Install CentOS as a VM into your environment (I’m spinning it up on VMware Workstation, then I’ll move it over to my homelab):
-
Enable networking, give it a domain name:
-
Create root password and an admin user:
-
Make sure it can access the internet (test with yum install open-vm-tools if you are keeping the VM around):
-
Docker commands to run (in order)
- Yum install docker
- Systemctl start docker
- Systemctl status docker
- Systemctl enable docker
- Yum install docker
-
If you did everything correctly, type in the command docker run hello-world and you should see the following output:
That’s it! Depending on how much time I get with it, I’ll start playing with orchestrator & tying my homelab up to AWS for container deployments next.
Pingback: Kubernetes, Containers, and YOU - Gestalt IT