Skip to content

Instantly share code, notes, and snippets.

@netoht
Last active September 10, 2021 12:51
Show Gist options
  • Save netoht/4bd7a00cfff68b83716cc0d351ee6f68 to your computer and use it in GitHub Desktop.
Save netoht/4bd7a00cfff68b83716cc0d351ee6f68 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