Installing Vagrant on CentOS

1 hour
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will take on the role of a DevOps Engineer working for OmniCorp. The Dev team needs Vagrant installed on one of their dev servers. The server already has Docker installed. Your mission is to install Vagrant and create a Vagrantfile that will install Ghost Blog.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install Vagrant

Install Vagrant:

yum -y install
Create a Vagrantfile

Create a Vagrantfile:

 Vagrant.configure("2") do |config|
    config.vm.provider "docker" do |d|
    d.image = "ghost:4.10.0"
    d.ports = ["80:2368"]
Deploy a Ghost Blog

Additional Resources

All work should be done in /root/.

Install Vagrant:

  1. In /root/, create a Vagrantfile. Your Vagrantfile should contain the following:

    • The file should be using the Docker provider.
    • The image should be set to use ghost.
    • The host port should be 80 which maps to 2368 on the container.
  2. Validate the Vagrantfile using the Vagrant CLI.

  3. Create a Docker container using the Vagrant CLI.

  4. Verify that your name shows when visiting the app in a browser.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?