Docker VirtualBox with Vagrant

if you have installed Vagrant CLI, just run the following command to create docker installed virtual box.

The following command will download a Vagrantfile file from Vagrant company in the current directory.

vagrant init kenanhancer/DockerMachine

This command will start the virtual machine.

vagrant up

If you want to check status of virtual machine, run the following command.

vagrant status

If you want to see ports of virtual machine, run the following command.

vagrant port

to connect created virtual machine, run the following command in the Vagrantfile directory.

vagrant ssh

if you want to see details of Vagrantfile, check it as below.

Creating a Vagrant Package file

vagrant package --output dockermachine.box --vagrantfile Vagrantfile

Leave a Reply

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