Setting up a development environment for Chef and Docker

In this tutorial we’re going to setup a dev environment for testing Chef recipes setting up Docker environments.

VirtualBox configuration

The first point consist in installing VirtualBox: my computer is working on OSX, I don’t wanted to change my OS to start working with Docker (Chef Docker provisioning is far more easy on Linux).
So I downloaded and installed the VirtualBox dog and a Fedora 20 iso.
Once Virtualbox was installed, I configured a new VB image with these settings:

  • General setting
  • Apply bidirectional copy/paste and Dnd
    System settings

  • MotherBoard settings
  • 4 gig of ram
    Start order to HDD then DVD
    ICH9 chipset
    Multitouch USB keypad
    IO-APIC and UTC enabled

  • Processors
  • 4 at 100%
    VT-x/pagination OK

  • Display
  • 128m of video with 3D acceleration

  • Drives
  • A DVD with the Fedora iso

  • Shared folders
  • One pointing on one of my host machine (to easily share files)
    20 Gig of hard drive in vdi format

Then started the VM and installed Fedora with default settings
Once The distro installed, I’d to change my keyboard layout in the preferences (choosing Francais(mac)).

Virtualbox requires client addition to work well, and its not so easy to find how to install it on Fedora.
At First, you’ve to update your packages (sudo yum update)
Then you’ve to install these packages:

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Finally, click on the ‘peripheral menu’ then install guests additions’.

Chef and Docker installation

Then, you’ve to install docker:

yum install docker-io

and ChefDK (‘cause it’s cool!)
Then, you’ve to install the bridge between both:

 yum install gem; chef gem install knife-container


As I can’t stand Aptana anymore, I bought Rubymine with Darkula theme for about 100$ (I’m a programmer so I can afford it).

Make a private Docker index for testing

Now I’m going to setup a private docker image repo (on my personal server) to test and tag my containers before releasing them on I was really helped by the serie on docker from french site

docker pull registry; docker run -d -i --name registyDocker -p 5000:5000 -m 512m registry

That’s all (I just have to make a redirection on my apache and chkconfig docker and docker run config)!


I’m now ready to follow the Chef-docker tutorial:

Share Button

One Comment

  • Elouise commented on May 22, 2016 Reply

    Thanks guys, I just about lost it lokoing for this.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.