Create Debian VM with Docker Host using Vagrant–automatically include Guest Additions

Lucas Jellema

A short and simple article. I needed a Debian VM that I could use as Docker host – to run on my Windows 10 laptop. I resorted to Vagrant. With a few very simple steps, I got what I wanted:

0. install Vagrant (if not already done)

0. install Vagrant plugin for automatically adding Virtual Box Guest Additions to every VM stamped out by Vagrant (so folder mapping from host laptop to VM is supported)


1. create a fresh directory with a simple Vagrant file that refers for Debian image

2. run vagrant up

3. sit back and relax (few minutes)

4. use vagrant ssh to connect into the running VM and start doing stuff.

The vagrant file:

Vagrant.configure("2") do |config|
config.vm.provision "docker"

config.vm.define "debiandockerhostvm"
# = "debian/jessie64" "private_network", ip: ""

config.vm.synced_folder "./", "/vagrant", id: "vagrant-root",
       owner: "vagrant",
       group: "www-data",
       mount_options: ["dmode=775,fmode=664"],
       type: ""
config.vm.provider :virtualbox do |vb| = "debiananddockerhostvm"
   vb.memory = 4096
   vb.cpus = 2
   vb.customize ["modifyvm", :id, "--natdnshostresolver1","on"]
   vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

Running Vagrant to create and subsequently run the VM:



Use vagrant ssh to enter the Virtual Machine and start mucking around:



Vagrant Plugin for automatically installing Guest Addition to each VM that is produced:

Vagrant Box Jessie:

Next Post

Rapid first few steps with Fn – open source project for serverless functions

Project Fn is an open source project that provides a container native, poly-language, cloud agnostic (aka run on any cloud) serverless platform for running functions. Fn was launched during Oracle OpenWorld 2017. Fn is available on GitHub ( ) and provides all resources required to get started. In this article, […]
%d bloggers like this: