Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Podman Machine + Virtualbox + Mac OSX

Install virtualbox

brew cask install virtualbox

Install podman machine

curl -L --output /usr/local/bin/podman-machine
sudo chmod +x /usr/local/bin/podman-machine

Create a podman VM

podman-machine create --virtualbox-boot2podman-url \ \
  --virtualbox-memory="4096" \
  --virtualbox-share-folder ~/Code:code \

# now test
podman-machine ssh box -- sudo podman version

Install Podman client

The defacto Mac client from brew cask install podman didn't work for me. I use podman-remote-darwin from this fork

curl -L --output /usr/local/bin/podman-remote-darwin
sudo chmod +x /usr/local/bin/podman-remote-darwin

Add init script

Add this to .zshrc / .bash_profile /

eval $(podman-machine env --varlink)
alias podman="podman-remote-darwin"
# alias docker="podman-remote-darwin"

Bind ip address to /etc/hosts

Get the ip address from podman-machine ip box podman-box

From here on out, curl podman-box

Copy link

sagittaros commented Jun 28, 2020

Hello world

$ podman run hello-world
Trying to pull
Getting image source signatures
Copying blob sha256:0e03bdcc26d7a9a57ef3b6f1bf1a210cff6239bff7c8cac72435984032851689
Copying config sha256:bf756fb1ae65adf866bd8c456593cd24beb6a0a061dedf42b26a993176745f6b
Writing manifest to image destination
Storing signatures

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

For more examples and ideas, visit:

Test drive with SQLserver with volume.

At this time, I have adjusted VM's ram allocation to 4GB

podman run \
  -e 'ACCEPT_EULA=Y' \
  -e 'MSSQL_SA_PASSWORD=Hi123World' \
   --name 'sql1' -p 1433:1433 \
   -v sql1data:/var/opt/mssql \

It works!

Copy link

sagittaros commented Jun 28, 2020

Everything works except podman/docker cp.

Progress is tracked here:

As a middleground, use podman-machine scp [from] [target] and then do podman cp inside VM

podman-machine scp -r source.txt root@box:/home/tc/target.txt

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