DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Keep Your Application Secrets Secret
  • How To Develop And Deploy Micro-Frontends Using Single-Spa Framework
  • How to Introduce a New API Quickly Using Micronaut
  • A Guide to Container Runtimes

Trending

  • Strategies for Securing E-Commerce Applications
  • Simplifying Multi-LLM Integration With KubeMQ
  • Optimizing Serverless Computing with AWS Lambda Layers and CloudFormation
  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  1. DZone
  2. Software Design and Architecture
  3. Containers
  4. Unleash the Power of Containerization: Installing and Running Podman on MacOS

Unleash the Power of Containerization: Installing and Running Podman on MacOS

This guide is your gateway to the world of Podman, taking you through the seamless process of installing and running containers on your macOS system.

By 
Ruchika Sreedhar user avatar
Ruchika Sreedhar
·
Sep. 07, 23 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
3.8K Views

Join the DZone community and get the full member experience.

Join For Free

In the rapidly evolving landscape of software development and deployment, containerization has become a cornerstone technology. Among the myriad containerization tools, Podman stands out as a lightweight, flexible, and efficient choice for macOS users. This guide is your gateway to the world of Podman, taking you through the seamless process of installing and running containers on your macOS system.

Installing Podman on MacOS

There are multiple avenues to bring Podman into your macOS environment. Below, we’ll explore two popular methods: using Homebrew for convenience and manual installation for those who prefer hands-on control.

Method 1: Using Homebrew

Homebrew, the popular macOS package manager, simplifies software installations. Let’s get started with Podman:

  1. Open your terminal: Launch your terminal to begin the installation journey.
  2. Install Homebrew: If Homebrew isn’t already installed, execute the following command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

   

3. Install Podman: Once Homebrew is up and running, simply type:

brew install podman                                                                                


Method 2: Manual Installation

For those who prefer a more hands-on approach, manual installation is the way to go:

  1. Visit Podman’s GitHub releases page: Go to the Podman GitHub releases page.
  2. Select the right MacOS version: Under the latest release, find the assets section and select the file corresponding to your macOS version.
  3. Install Podman: Once downloaded, drag the Podman desktop application to your Applications folder for a hassle-free installation.

Setting up Podman

With Podman successfully installed on your macOS system, let’s explore two paths for setting it up: using the intuitive desktop application or leveraging the power of the command-line interface (CLI).

Using Podman Desktop

  1. Launch Podman Desktop: Find and open the Podman desktop application located in your Applications folder.
  2. Install Podman: Click on “Install Podman” within the application. It will automatically configure Podman for you. In case of errors, the CLI method is available as a backup.

Using CLI To Set Up Podman

In case you encounter issues with the desktop application, you can manually set up Podman using the command-line interface:

  1. Open your terminal: Fire up your terminal for some command-line magic.
  2. Execute the following commands: Copy and paste these commands to initiate the Podman setup
podman machine stop
podman machine rm
podman machine init -v $HOME:$HOME -v /Users -v /Volumes -v /usr/local/lib/node_modules
podman machine set --rootful
podman machine start


These commands will ensure a smooth start for your Podman desktop.

Verifying Your Installation

To ensure Podman is up and running without a hitch, use these commands:

Check Running Containers

podman ps


Run a New Container (Example With NGINX)

podman run -d -p 8080:80 nginx


List Running Containers

podman ps


Stop a Container 

Replace <container_id> with the actual ID

podman stop <container_id>


Uninstalling Podman

Should you ever decide to bid adieu to Podman, here’s how to do it:

1. If you installed Podman using Homebrew:

  • Delete all Podman-related files from the /opt path of your computer.
  • Remove any Podman-related files from the /Cellar path.

2. If you installed Podman manually:

  • Delete all Podman-related files from the /opt path.

This will ensure a thorough and clean uninstallation of all Podman-related files and directories.

Conclusion

Podman opens the door to effortless container and pod management on macOS. Whether you opt for the swift Homebrew installation or the hands-on manual setup, Podman empowers you with a robust containerization solution for your development and deployment needs. Dive in today and embark on your containerization journey with confidence. Happy coding!

Command-line interface Container MacOS

Published at DZone with permission of Ruchika Sreedhar. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Keep Your Application Secrets Secret
  • How To Develop And Deploy Micro-Frontends Using Single-Spa Framework
  • How to Introduce a New API Quickly Using Micronaut
  • A Guide to Container Runtimes

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!