scottslowe-learning-tools/vagrant-docker/Vagrantfile

35 lines
1 KiB
Text
Raw Normal View History

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Specify Vagrant version and Vagrant API version
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
# Create and configure the Docker container(s)
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Disable synced folders for the Docker container
# (prevents an NFS error on "vagrant up")
config.vm.synced_folder ".", "/vagrant", disabled: true
# Configure the Docker provider for Vagrant
config.vm.provider "docker" do |docker|
# Define the location of the Vagrantfile for the host VM
# Comment out this line to use default host VM that is
# based on boot2docker
docker.vagrant_vagrantfile = "host/Vagrantfile"
# Specify the Docker image to use
docker.image = "nginx"
# Specify port mappings
# If omitted, no ports are mapped!
docker.ports = ['80:80', '443:443']
# Specify a friendly name for the Docker container
docker.name = 'nginx-container'
end # config.vm.provider
end # Vagrant.configure