The fastest path to a working Docker Engine VM on VirtualBox
I created this document, because I found no straight forward method to create a simple VM with the Docker Engine installed.
This document is designed to show a method of creating the fastest path to a working Docker VM on your laptop, whether Mac or Windows based, in about 15 minutes (depending on the power of your laptop and speed of your Internet connection)
Follow these steps:
-
Install VirtualBox from one of these downloads.
-
Download the Ubuntu Desktop ISO.
-
In VirtualBox, use the New button
to create a Linux VM. Give it a name, select Linux for the Type and Ubuntu 64bit for the Version. Set a memory size of at least 2GB, and click the Create button:
- Add a disk volume of at least 10GB:
- Start the VM that you just created in VirtualBox:
- Use the browse control to navigate to the Ubuntu ISO that you downloaded, and mount it. Click Start:
- Install Ubuntu:
- Accept install options:
- Erase disk and install (this erases and installs Ubuntu on the VDI virtual disk of the VM):
- Set time zone and language:
- Set login info:
- Ubuntu is then installed. Restart the VM when prompted:
- Log into the VM:
- Search and access the Terminal:
- For convenience, run as root:
$ sudo -s
Then, at the command line:
- Install curl:
$ apt install curl
- Install Docker with curl:
$ curl -sSL https://get.docker.com/ | sh
- Verify Docker Engine install and run hello-world:
$ docker --version
$ docker run hello-world
Congratulations, you have a working VM with the latest Docker Engine installed and have run your first container!
At this point, you can do other things with your VM to add convenience.
- Install Guest Additions CD Image (when the VM is running, access this under Devices from the VirtualBox menu bar):
- Set options to allow copy and paste:
- Set up a volume mount to map to a directory on your laptop to the vm to copy/share files:
















