Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save 1eedaegon/ef395a971a8d49219786ebdd4c61e25d to your computer and use it in GitHub Desktop.
Save 1eedaegon/ef395a971a8d49219786ebdd4c61e25d to your computer and use it in GitHub Desktop.
How to install podman cli with docker compose
#!/bin/bash
# 1. Install podman using *homebrew*
brew install podman
# 2. Docker-compose
brew install docker-compose
# 3. Create a symbolic link from podman to docker
ln -s $(which podman) /usr/bin/docker
# 4. Initialize podman
# My Mac has a 10core CPUs and 16GB of RAM
podman machine init --cpus 4 -m 8192 --now
# 5. podman machine start
podman machine stop; podman machine start
# [Optional] Use Docker commands with Podman
sudo ln -s $(which podman) /usr/local/bin/docker
# OR
# echo 'alias docker=podman' >> ~/.zshrc
############################
#### 6. Happy podman :) ####
#### podman hello world ####
############################
podman run hello-world
# !... Hello Podman World ...!
#
# .--"--.
# / - - \
# / (O) (O) \
# ~~~| -=(,Y,)=- |
# .---. /` \ |~~
# ~/ o o \~~~~.----. ~~
# | =(X)= |~ / (O (O) \
# ~~~~~~~ ~| =(Y_)=- |
# ~~~~ ~~~| U |~~
#
# Project: https://github.com/containers/podman
# Website: https://podman.io
# Desktop: https://podman-desktop.io
# Documents: https://docs.podman.io
# YouTube: https://youtube.com/@Podman
# X/Twitter: @Podman_io
# Mastodon: @[email protected]
############################
#### 6. Happy docker :) ####
#### docker hello world ####
############################
docker login docker.io
podman run docker.io/hello-world
# Trying to pull docker.io/library/hello-world:latest...
# Getting image source signatures
# Copying blob sha256:c9c5fd25a1bdc181cb012bc4fbb1ab272a975728f54064b7ae3ee8e77fd28c46
# Copying config sha256:f1f77a0f96b7251d7ef5472705624e2d76db64855b5b121e1cbefe9dc52d0f86
# Writing manifest to image destination
#
# 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.
# (arm64v8)
# 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:
# https://hub.docker.com/
#
# For more examples and ideas, visit:
# https://docs.docker.com/get-started/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment