Created
February 15, 2022 22:27
-
-
Save Tanver-Hasan/3871972c2cb9b5d2048c750fdd1f760b to your computer and use it in GitHub Desktop.
Vagrant file for provisiong Centos:7 machine with Genome, Docker engine , selinux
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 = "centos/7" | |
config.vm.provision :docker | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = true | |
vb.memory = "2048" | |
vb.cpus = 2 | |
if Vagrant.has_plugin?("vagrant-vbguest") then | |
config.vbguest.auto_update = false | |
end | |
end | |
config.vm.synced_folder "/host-src", "/srv/shared" | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo yum update | |
sudo yum groupinstall -y 'gnome desktop' | |
sudo yum install -y 'xorg*' | |
sudo yum remove -y initial-setup initial-setup-gui | |
sudo systemctl isolate graphical.target | |
sudo systemctl set-default graphical.target | |
sudo yum install policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans | |
SHELL | |
end |
If Vbox guest addition is not installed or not found, install it via following command
vagrant plugin install vagrant-vbguest
Install docker compose
vagrant plugin install vagrant-docker-compose
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute up command in same directory where Vagrantfile created with above script
stop vagrant machine