Navigate back to the homepage

How to install Docker on macOS

Beginner’s guide to install and run Docker on macOS.

Ahmed Abdulrahman
Feb 10th, 2020 • ☕️ 1 min read
macostoolstools

What is Docker?

It is a tool that allows you to easily share, deploy, and run applications consistently in many environments through containers. It’s available Mac, Linus, and Windows. Since, I am Mac user I am going to show you how to install it on macOS. For other platforms see:

Installation

First, you need to download Docker Desktop Mac, you can download it from docker hub here.

If you wonder that is Docker Hub, it’s an online repository similar to GitHub & NPM but Docker images and the login that Docker Desktop will connect to.

Once download is completed, double-click the DMG file, and drag-and-drop Docker into macOS Applications folder:

Docker installation
Docker installation

This installs the following:

  • Docker Engine
  • Docker CLI Client
  • Docker Compose
  • Docker Machine

Double-click Docker.app which you can find inside Applications folder to start Docker.

Docker installation
Docker App

You can see the whale in your status bar which indicates Docker is running and accessible:

Docker Whale icon in status bar
Status Bar

Once all this is completed, you can ensure Docker CLI is set up and working by checking the versions of Docker Engine, Compose, and Machine

1$ docker --version
2$ docker-compose --version
3$ docker-machine --version

To make sure everything is working as expected, you can run a simple dockerized web server:

1$ docker run -d -p 80:80 --name webserver nginx

That’s it!

You’ve got Docker running! Let’s talk about the concept of images and containers in the following blog.

If you have enjoyed this article? drop a coffee ☕️ tip here or support me for less than the cost of a coffee.

Thanks for reading!


Discuss on TwitterFollow @_ahmed_ab

Other things I've written

Git Tips & Tricks 🔥

Learn how to improve your Git-based workflow with cool tips & tricks that can save you some time. It's time to clean up your command line!

Jan 8th, 2020 · 3 min read

How to Automatically Sort Import Modules with ESLint

In this artcile, you’ll learn how configure ESLint to imports for us automatically.

Jan 5th, 2020 · 1 min read

© 2018–2020
Ahmed Abdulrahman

Contact
hello@aadev.me

Link to $https://twitter.com/_ahmed_abLink to $https://www.behance.net/ahmedabdulrahmanLink to $https://github.com/AhmedAbdulrahman