Install Docker on macOS

Last Updated on : 2023-12-07 03:02:54download

This topic describes how to install Docker for macOS. These steps apply when you deploy Tuya Edge Gateway (TEdge) in containers. For more information, see Install Docker Desktop on Mac.


To install Docker, your Mac must be running macOS Mojave 10.14 or later. For more information, see Docker Desktop for Mac user manual.

Install Docker

Method 1: Use Homebrew

Homebrew Cask supports Docker Desktop for Mac. This allows you to easily install Docker by using Homebrew Cask:

$ brew install --cask docker

Method 2: Manually download a disk image

To manually install Docker, download the Docker.dmg file from the Docker official website. The file is about 500 MB.

Similar to other macOS software, to install Docker, double-click the .dmg file, and drag the Moby icon to the Application folder.

Install Docker on macOS

Run services on Docker

  1. Find the Docker icon on your desktop and double-click the icon to run Docker.

  2. Then, the Moby icon appears in the top-right corner of the desktop. This icon indicates the running status of Docker.

  3. You can click the Moby icon to show the operation menu.

  4. Run the following command in Terminal to check the current Docker version:

    $ docker --version
    Docker version 20.10.0, build 7287ab3
  5. (Optional) If both docker version and docker info are correct, perform the following steps to run an Nginx server:

    i. Use the following command to run the Nginx service.

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

    ii. Open your browser and visit http://localhost. If the message “Welcome to nginx!” is returned, Docker Desktop for Mac is installed.

    iii. To stop and delete the Nginx server, run the following command:

     $ docker stop webserver
     $ docker rm webserver