Created
March 3, 2017 18:17
-
-
Save rafaelnize/590b1b7ea58df73062bbc16b16f14130 to your computer and use it in GitHub Desktop.
vagrantfile docker
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
$bootstrap=<<SCRIPT | |
apt-get update | |
apt-get -y install wget | |
wget --no-check-certificate -qO- https://get.docker.com/ | sh | |
gpasswd -a vagrant docker | |
sudo apt-get -y install python-pip | |
sudo pip install -U docker-compose | |
service docker restart | |
docker-compose --version | |
SCRIPT | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "192.168.33.26" | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "1024"] | |
end | |
#config.vm.provision :shell, inline: "apt-get update -y" | |
config.vm.provision :shell, inline: $bootstrap | |
#config.vm.provision :shell, inline: "ln -s /vagrant /home/vagrant/terraform" | |
config.vm.provision :shell, inline: "bash /vagrant/buildDockerImage.sh" | |
#config.vm.synced_folder "run/", "/home/vagrant/run/", type: "rsync", create: true | |
#config.vm.provision "file", source: "run/Dockerfile", destination: "/home/vagrant/run/Dockerfile" | |
#config.vm.synced_folder "secrets/", "/home/vagrant/secrets/", type: "rsync", create:true | |
#config.vm.provision :shell, inline: "docker build -t mlgexpress:v01 ." | |
#config.vm.provision :shell, inline: "docker run -d -p 8080:8080 -t mlgexpress:v01" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment