From Zero to Docker Sandbox in 2 Minutes

September 11, 2017 | 2 minute read
Text Size 100%:

This post was updated on June 5, 2019 to include use of Vagrant builds published on GitHub



OK, not completely zero, but pretty close! If you have Oracle VM VirtualBox and Vagrant installed and would like to take Docker for a spin on Oracle Linux, you should try this.



Our most recent Oracle Linux 7 Update 6 Vagrant box makes a good starting point to set up and configure Docker. It includes:

  • Unbreakable Enterprise Kernel 5 with support for Docker and Btrfs
  • A spare virtual disk (/dev/sdb) to create a Btrfs partition for management of Docker images and containers
  • Yum configured to access the Addons repo on Oracle Linux yum server

Using a Vagrantfile from our repository of Vagrant builds on GitHub, I set up Oracle Linux with Docker configured on my MacBook in about 2 minutes and change*). To use this Vagrantfile:

  1. If you haven't already, install Oracle VM VirtualBox and Vagrant.
  2. Clone the vagrant builds repository from the Oracle organization on GitHub
  3. Change to the DockerEngine directory
  4. Run Vagrant commands to start the build, and provision your virtual machine, and connect via ssh

I ran the following with VirtualBox 6.0.8 and Vagrant 2.2.4:

$ git clone
$ cd vagrant-boxes/DockerEngine/
$ vagrant up
$ vagrant ssh


You are now ready to run Docker commands. For example, try running an Oracle Linux 6 container:

[vagrant@ol7-docker-engine-new ~]$ docker run -it oraclelinux:6-slim
Unable to find image 'oraclelinux:6-slim' locally
Trying to pull repository ... 
6-slim: Pulling from
a653e0382385: Pull complete 
Digest: sha256:dab3d020772dd8916892c814931df438f5afe6b06ca72d66d279bd58d52f6116
Status: Downloaded newer image for oraclelinux:6-slim
bash-4.1# cat /etc/oracle-release
Oracle Linux Server release 6.10

If you are new to Docker and already use VirtualBox and Vagrant, this is a quick way to explore what Docker is all about. I also recommend this article: Getting Started with Docker on Oracle Linux and Chapter 4 from the Oracle Linux 7 documentation: Working with Containers and Images.


As always, give us your feedback and questions in the Oracle Linux space on the Oracle Community.

*) Your mileage may vary based on download speeds.

Sergio Leunissen

Previous Post

Oracle Linux 7 Update 4 General Availability

Scott Lynn | 4 min read

Next Post

Oracle Database 12c Preinstall Steps for Oracle Linux Simplified

Sergio Leunissen | 1 min read