Based on CentOS-Dockerfiles
Modified by Mattew Cwarman
Use d.image
is required in Vagrantfile
if you want use docker pre-build image.
Otherwise use d.build_dir
for build your custom image from a Dockerfile.
For more configuration detail consult the documentation
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
Vagrant.configure("2") do |config|
config.vm.provider "docker" do |d|
d.image = "pasing/centos7-ssh"
d.has_ssh = true
end
end
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
Vagrant.configure("2") do |config|
config.vm.provider "docker" do |d|
d.build_dir = "."
d.has_ssh = true
end
end
Command: vagrant up [name|id]
This command creates and configures guest machines according to your Vagrantfile.
Command: vagrant halt [name|id]
This command shuts down the running machine Vagrant is managing.
Command: vagrant status [name|id]
This will tell you the state of the machines Vagrant is managing.
Command: vagrant ssh [name|id] [-- extra_ssh_args]
This will SSH into a running Vagrant machine and give you access to a shell.
Command: vagrant destroy [name|id]
This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process.
For more command visit Vagrant CLI