How to Install Podman on MacOS

Open Terminal and execute command

% brew install podman

Initial Machine

% podman machine init

When we execute this line of command, Podman will check whether there is the latest FCOS in our host, and if not, it will download it. The full name of FCOS is Fedora CoreOS. It is designed as a container-based minimal operating system. Podman will use this operating system to create VMs.

Start VirtualMachine

% podman machine start

Manage Machine

% podman machine -h
Manage a virtual machine
Description:
  Manage a virtual machine. Virtual machines are used to run Podman.
Usage:
  podman machine [command]
Available Commands:
  init        Initialize a virtual machine
  list        List machines
  rm          Remove an existing machine
  ssh         SSH into an existing machine
  start       Start an existing machine
  stop        Stop an existing machine

Test Running nginx container

% podman run -dt -p 8080:80 nginx

Ref:

Podman on Mac 101

張貼留言

0 留言