Skip to content

Instantly share code, notes, and snippets.

@halfvector
Last active May 10, 2023 22:18
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 halfvector/f72e709c197c5e5be6ce113a552ee5d0 to your computer and use it in GitHub Desktop.
Save halfvector/f72e709c197c5e5be6ce113a552ee5d0 to your computer and use it in GitHub Desktop.
Latest Docker on Ryzentosh
# so at the time of writing, hyperkit doesn't work on AMD/Ryzen.
# this means no native docker support.
# the default docker-machine setup uses the deprecated boot2docker which is stuck with a buggy docker-19.
# i'm looking to run the latest docker daemon, have proper service-hostnames, and easy port-forwarding,
# and use the same docker-compose setups as a normal OSX/Linux machine.
# install the latest docker-host VM from https://github.com/burmilla/os/releases
# boot2docker and rancherOS are now both deprecated/unsupported.
# burmillaOS is an active fork of rancherOS.
docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/burmilla/os/releases/download/v1.9.0/burmillaos-v1.9.0.iso --virtualbox-memory 1500 default
# connect into vm
docker-machine ssh default
# find latest supported engine version
sudo ros engine list
# download the appropriate image and run it in the VM
# docker 20.10 lets you use hostnames to link containers in docker-compose
sudo ros engine switch docker-20.10.3
# enable tcp port-forwarding for easy port-forwarding
sudo sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/' /etc/ssh/sshd_config
# enable virtualbox tools. this will auto install vboxsf for mounting shared folders.
sudo ros service enable virtualbox-tools
sudo ros service up virtualbox-tools
# to make volume-mounts work we need to mount the root path of future volume mounts
# mount the Users shared-folder from virtualbox into the VM
sudo mkdir /Users
sudo mount.vboxsf -r Users /Users
echo "mount.vboxsf -r Users /Users" | sudo tee -a /etc/rc.local
# restart sshd and exit VM
sudo service ssh restart
exit
# now setup ephemeral port-forwarding (will disappear when VM is restarted)
# replace port 2181 with whatever you need
docker-machine ssh default -L 2181:localhost:2181 -f -N
# you can now connect to the docker container running in the VM directly from host
curl localhost:2181
@djonko
Copy link

djonko commented Jan 21, 2023

does this still work on new mac os ventura (ryzentosh) ?

@halfvector
Copy link
Author

does this still work on new mac os ventura (ryzentosh) ?

Hey @djonko, sadly no -- VirtualBox doesn't seem to work on macOS Ventura.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment