Skip to content

Instantly share code, notes, and snippets.

@mc0e
Created December 28, 2016 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mc0e/57855d830edfb990ab4ec792dddf8b7c to your computer and use it in GitHub Desktop.
Save mc0e/57855d830edfb990ab4ec792dddf8b7c to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
# install docker
config.vm.provision "shell", inline: <<-SHELL
curl -fsSL https://get.docker.com/ | sh
systemctl enable docker.service
systemctl start docker
groupadd docker
sudo usermod -aG docker vagrant
SHELL
config.vm.provision "shell", inline: <<-SHELL
mkdir /var/run/centos
docker run -d --restart always --name test --hostname test -v /var/run/centos:/var/test openjdk:8-jre-alpine tail -F /var/test/file.txt
echo "This is new line" >> /var/run/centos/file.txt
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment