- Ensure the required box is installed.
vagrant box list # 'envimation/ubuntu-xenial-docker' should appear.
- Ensure you are in directory step-1.
pwd # check current directory
ls # and it should contain just the README.md
- Generate Vagrantfile.
vagrant init envimation/ubuntu-xenial-docker
- Check before firing up.
vagrant status # status should be "not created"
- Bring it on.
vagrant up
vagrant status # status change to "running"
- Connect into it.
vagrant ssh default
- Do something with the machine.
# ... do something ...
exit
- Halt it.
vagrant halt
vagrant status # status change to "poweroff"
- Clean up when not needed anymore, free up space.
vagrant destroy
vagrant status # status change back to "not created"
Zhan.Shi @ 2017