Running Docker on CentOS on ESXi

By | August 9, 2016

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.

  1. Have a vSphere environment 😉
    1. See my homelab articles if you need help with this part
  2. 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).
  3. 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):

  4. Enable networking, give it a domain name:

  5. Create root password and an admin user:

  6. Make sure it can access the internet (test with yum install open-vm-tools if you are keeping the VM around):

  7. Docker commands to run (in order)
    1. Yum install docker
    2. Systemctl start docker
    3. Systemctl status docker
    4. Systemctl enable docker
  8. 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.

One thought on “Running Docker on CentOS on ESXi

  1. Pingback: Kubernetes, Containers, and YOU - Gestalt IT

Comments are closed.