Create a Centos Staging Server


The CentOS VM will become the staging area for the docker container.


  1. Virtualbox NatNetwork created (all hosts on it). Virtual Box NAT Config

  2. A webserver running on the NatNetwork that can host the kickstart file.
    • Alternate - you can add an additional host-only adapter and serve the kickstart file from the host machine. See the “Workstation Build Process” Document and the section about the Virtual Machine
  3. Configure a NAT Network on the host OS
VBoxManage natnetwork add --netname natnet1 --network "" --enable

References & Additional Information

  1. Basic Guide
  2. Kickstarter Password handling
    import crypt,getpass; print crypt.crypt(getpass.getpass(), "$6$4egcSVDxHKCc1tpG")


  1. Download the minimal Centos install from

Centos Mirror

In VirtualBox…

  1. Create a new machine virtualbox (Button in upper left) New Vbox VM
  2. Name the image centos_staging
  3. Set ram to 2048 MB
  4. Create virtual hard disk - VDI - Dynamically allocated - 20G
  5. Configure 2 network adapters on the base image.

    Network Adapter 1

    NAT to get out4

    Network Adapter 2

    NAT NET to communicate with other other devices on the network

    Network Configuration

    VBOX Network Manager Configuration

Note This two adapter configuration may need revisiting. NAT will allow internet, but isolates client devices. NAT Network allows devices on the same network to talk, and to talk to the host, but not to the internet. Additional Reference

  1. Select downloaded CentOS image file

On the temporary server hosting the kickstart file…

  1. Run these shell commands on the server that will host the kickstart file

    cd ~
    mkdir proj
    git clone
    cd /proj/container_toolbox
    ifconfig #(get the IP)
    ls 010*# to get the filenames, kickstart should be 010-CentOS7-cis.ks

On the New CentosVM…

  1. Virtually power the machine on and press tab on boot and replace the ks with
     http://[IP]/010-CentOS7-cis.ks in the screenshot below.  The whole line should look like:
    vmlinuz initrd=initrd.img ks=

    Expect: Everything should install, VM should be ~ 7G on disk Tip: You may have trouble connecting to the internet at this point - problem seems to be in the nat network created, using a simple NAT network immediately may let the machine get through the gateway.

  2. Run these shell commands as root on the VM that will create the docker image (staging server)
    yum update -y
    yum install git -y
    cd /opt
    git clone
    git clone
    ./project-base/stagebin/ # install packages and configure env.
    systemctl start docker # launch docker
    systemctl enable docker #launch docker on startup

    Expect: reboot; git installed; container toolbox available; docker running and will

  3. On startup Edit the /etc/hosts/allow to permit the host only adapter to ssh:
    vi /etc/hosts.allow
    #add the following line
    sshd :
  4. Edit the SSH config to allow extended sessions - Note this should only be extended for protected dev servers.
      vi /etc/ssh/sshd_config
      #update the following value
      ClientAliveInterval 3000