Skip to content

Instantly share code, notes, and snippets.

@seb-schulz
Last active October 9, 2023 08:35
Show Gist options
  • Save seb-schulz/6231b2c7a05a59736a8c83bd68f13ab8 to your computer and use it in GitHub Desktop.
Save seb-schulz/6231b2c7a05a59736a8c83bd68f13ab8 to your computer and use it in GitHub Desktop.
Improve docker experience on a macbook
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
ssh_pub_key = File.readlines("#{Dir.home}/.ssh/id_ed25519.pub").first.strip
config.vm.box = "debian/testing64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 4*1024
vb.cpus = 4
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y htop git docker.io docker-compose
grep '#{ssh_pub_key}' .ssh/authorized_keys > /dev/null && true || echo '#{ssh_pub_key}' >> .ssh/authorized_keys
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment