Skip to content

Instantly share code, notes, and snippets.

@yasn77
Last active May 22, 2024 10:13
Show Gist options
  • Save yasn77/fc87d750c8dd0f9d2839de1fef34adb8 to your computer and use it in GitHub Desktop.
Save yasn77/fc87d750c8dd0f9d2839de1fef34adb8 to your computer and use it in GitHub Desktop.
Install Podman on Mac Silicon Chipset
  1. Install cfkit for Apple Hypervisor for VMs (not using Qemu)
brew tap cfergeau/crc
brew install vfkit
  1. Install Podman + Podman Desktop
brew install podman podman-desktop

2a. Optional: Go through https://podman-desktop.io/docs/migrating-from-docker (ensuring docker compatibility is enabled)

Using vfkit

  1. Create Podman Machine using vfkit
export CONTAINERS_MACHINE_PROVIDER=applehv
podman machine init --now
  1. Update containers.conf so that Podman Desktop see's the Machine
$EDITOR  ~/.config/containers/containers.conf
# Set machine.provider="applehv"

Should look something like:

...
[machine]
  provider="applehv"
...

NOTE: Due to a bug in recent qemu, it segfaults. As per this issue use an older version of Fedora:

podman machine init --disk-size 60 --rootful --cpus=4 --memory=8192 --image https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/39.20240407.3.0/aarch64/fedora-coreos-39.20240407.3.0-applehv.aarch64.raw.gz

Using Lima (Optional)

  1. Install lima (via brew) and lima extension in Podman Desktop
  2. Create lima vm:
limactl start --vm-type=vz --rosetta --name=podman template://podman
  1. Set Podman connection:
podman system connection add lima-podman "unix:///Users/yasser.saleemi/.lima/podman/sock/podman.sock"
podman system connection default lima-podman

Using Lima with Docker

  1. Install lima (via brew)
  2. Create lima vm:
limactl start --vm-type=vz --rosetta --name=docker template://docker
  1. Set DOCKER_HOST:
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
  1. Follow step (2) here

That should be it

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