Skip to content

Instantly share code, notes, and snippets.

@na0x2c6
Last active March 17, 2021 12:16
Show Gist options
  • Save na0x2c6/648c513406d6ea96efe7a96021925467 to your computer and use it in GitHub Desktop.
Save na0x2c6/648c513406d6ea96efe7a96021925467 to your computer and use it in GitHub Desktop.
Vagrantfile to use podman on Mac OS
# refs: https://github.com/containers/podman/blob/master/docs/tutorials/remote_client.md#using-the-client
# execute on client and in the Vagrant directory that is for running Podman on a VM
podman --remote system connection add vagrant --identity "$(vagrant ssh-config | grep IdentityFile | awk '{ print $2 }')" ssh://[email protected]:2222/run/user/1000/podman/podman.sock
Vagrant.configure("2") do |config|
# refs: https://app.vagrantup.com/fedora
config.vm.box = "fedora/33-cloud-base"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
# https://www.vagrantup.com/docs/synced-folders/nfs
config.vm.synced_folder "/your/awesome/path", "/mnt/awesomepath", type: "nfs", nfs_version: 3
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo dnf -y install podman
# refs: https://github.com/containers/podman/blob/master/docs/tutorials/remote_client.md#creating-the-first-connection
systemctl --user enable --now podman.socket
sudo loginctl enable-linger $USER
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment