Vagrantfile 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. Vagrant.configure("2") do |config|
  2. # boxes at https://vagrantcloud.com/search.
  3. config.vm.box = "Box_name_to_be_download"
  4. config.vm.network "private_network", ip: "MyIP"
  5. config.vm.network "public_network"
  6. config.vm.provider "virtualbox" do |vb|
  7. vb.memory = "2048"
  8. end
  9. config.vm.provision "shell", inline: <<-SHELL
  10. sudo apt-get update
  11. sudo apt-get install \
  12. ca-certificates \
  13. curl \
  14. gnupg -y
  15. sudo install -m 0755 -d /etc/apt/keyrings
  16. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  17. sudo chmod a+r /etc/apt/keyrings/docker.gpg
  18. echo \
  19. "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  20. "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  21. sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  22. sudo apt-get update
  23. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
  24. SHELL
  25. end