Created
April 23, 2018 20:12
-
-
Save SamuelM333/8c6c35a67bae822f71b0144ff798e55e to your computer and use it in GitHub Desktop.
Vagrantfile using Docker and Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
# vagrant plugin install vagrant-docker-compose | |
# Provision Docker | |
config.vm.provision :docker | |
config.vm.provision :docker_compose, yml: "/home/vagrant/docker/docker-compose.yml", run: "always" | |
config.vm.define :mysite do |mysite| | |
mysite.vm.network :private_network, ip: "192.168.31.100" | |
mysite.vm.hostname = "mysite" | |
mysite.vm.synced_folder "docker/", "/home/vagrant/docker", create: true | |
mysite.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", 1024] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment