Skip to content

Instantly share code, notes, and snippets.

@doytsujin
Forked from netoht/podman-install-macos.sh
Created September 7, 2021 14:41
Show Gist options
  • Save doytsujin/836701deb5e5521712628e575ea22c64 to your computer and use it in GitHub Desktop.
Save doytsujin/836701deb5e5521712628e575ea22c64 to your computer and use it in GitHub Desktop.
podman on macOS - basic configuration (like a docker)
# Pre-req
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install podman
brew install podman
# Start vm
podman machine init
podman machine start
# Configure vm
podman machine ssh
podman machine ssh "echo 'short-name-mode=\"disabled\"' | sudo tee /etc/containers/registries.conf.d/000-short-name-mode.conf"
podman machine ssh "echo 'unqualified-search-registries = [\"docker.io\"]' | sudo tee /etc/containers/registries.conf.d/000-unqualified-search-registries.conf"
# You must add lines in ~/.config/containers/containers.conf (host)
# This is required because: https://github.com/containers/podman/issues/11396
# [containers]
# rootless_networking="cni"
# unfortunately volumes bind feature is not implemented yet: https://github.com/containers/podman/issues/11401
# Install podman-compose
pip3 install podman-compose
# Testing
sudo podman run hello-world
# More:
# https://github.com/containers/podman/blob/main/rootless.md
# https://github.com/containers/podman/blob/main/troubleshooting.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment