Since Docker is becoming more and more industry standard, I’m writing this post to install Docker on Mac OS X without using the installation package Docker Toolbox. IMPORTANT: I recommend to use. Feb 12, 2016 Since Docker is becoming more and more industry standard, I’m writing this post to install Docker on Mac OS X without using the installation package Docker Toolbox. IMPORTANT: I recommend to use. The Playground comes with several flavors of KrakenD and a mock API. Everything is ready to start playing, just do a docker-compose up! If you are already familiar with Docker, the easiest way to get started is by pulling and running the KrakenD image from the Docker Hub.
Docking on OS X. We’ll run the Docker client natively on OS X, but the Docker server will run inside our boot2docker VM. This also means boot2docker, not OS X, is the Docker host, not OS X. Let’s install dat software. Installation Step 1: Install VirtualBox. Go here and do it. You don’t need my help with that. Note Mac OS X version 10.12.6 was used for these instructions. Install nvm and Apple Xcode First install nvm (the Node version manager). Nvm is a tool that allows you to easily install, update and switch between versions of Node.js.
Several months ago, I came back to my desk after lunch and to my chagrin, my macOS was making a long constant blowing sound—the fan was on high speed. Now, mind you, I have a fairly new and beefy Mac. 2.4 GHz, 8-core, 64GB running Big Sur, 11.2.1. So what in the world could be triggering my fan to such a high level? I discovered that the culprit was Docker. And the only way to rid myself of the noise was a Docker restart.
At that moment, I added a task to my To-Do list: Replace Docker with Podman. However, early attempts and initial research proved difficult simply because I wanted it to be just as easy to start Podman on my Mac as is the Docker client. I use Alfred (Spotlight replacement) and launch most things with a quick cmd+space. So, if I couldn’t do the same with Podman, I was going to have to take a hard pass on the replacement. And, unfortunately, there isn’t a one-click, easy Podman macOS install, so I had to stitch a couple of few items together to get that quick launch. To help you have a better experience, I've documented the process here.
[ Readers also liked: From Docker Compose to Kubernetes with Podman ]
More about automation
A couple of months ago, I was able to get Podman running on my Mac via
podman-machine, but I ran out of time and motivation to convert it into something easy to launch. Fast forward a couple of months,
podman-machine is now deprecated in lieu of Vagrant. I found a couple of good articles, like Brent and Ashley’s post on
podman remote, which provided most of my answer and helped me figure out how to deal with some fun podman.sock errors. However, I couldn’t find my holy grail. I mean, I’m a lazy dude. My frustration level is measured by the amount of typing or clicks it takes me to do something. And if it’s more than a couple of clicks, I’ll need to go eat more pizza to calm me down. So, here it is in three main parts: The pre-requisites, creating a script, and then creating the macOS app.
1. You’ll need the latest version of VirtualBox
2. Install Vagrant
$ brew install podman
Create the script
4. Create a directory to store the Vagrantfile, such as
/Users/[username]/tools/podman (you’ll need to modify scripts below to use this directory)
5. Create the following Vagrantfile in your new directory. I’m using Andres’ Vagrant file, but I found others as well.
6. Add the following lines to your
~/.zshrc file to create global environment variables for the Podman host and SSH key. This step allows you to make a successful connection in any terminal window. Note the second variable contains a directory that needs to be changed to reflect your setup.
7. Create the following bash shell script. Note the change required to reflect your setup. I called my script pman.
At this point, you can open a terminal and type
$ pman up to start Podman. But, I told you I was lazy, right? That’s way too many clicks and keypresses for my taste, so I made this a macOS app.
Make it a macOS app
1. Open up Automator on your Mac, and choose Application as your document.
Mac Os X Install Docker Download
2. Drag and drop the Run Shell Script item into the workflow, and type the following script:
Note: The example path
~/Dev/bin/pman will need to be updated to where you saved and named the bash script above.
3. Save the Application. It should save directly into the Mac Applications folder. I called my Podman application Seals because of the Podman logo.
4. As an added bonus, I found the Podman logo and created a 128x128 PNG image with GIMP to use as the application icon:
- Open the 128x128 png in preview and click Edit > Copy
- Right-click the new Application, and click Get Info.
- Select the icon on the top left, and paste the contents of the clipboard.
Mac Os X Docker Setup
[ Get this free ebook: Managing your Kubernetes clusters for dummies. ]
Install Docker On Mac Os X
Mac Os X Install Docker Software
There you have it. Now you can use Spotlight or Alfred to run Podman. It’s just a cmd+space and a couple of letters away.