Table of Contents
6. (Optional) Enable Shell Completion and CLI Tools
Home Operation and Maintenance Docker How to install Docker on Mac?

How to install Docker on Mac?

Jul 26, 2025 am 05:55 AM

Docker can be installed on a Mac using Docker Desktop by following these steps: 1. Verify your Mac meets the requirements—macOS 10.15 or newer, Intel or Apple Silicon chip, at least 4GB RAM, and virtualization enabled; 2. Download Docker Desktop from //m.sbmmt.com/link/58f170c366f582dba770b94119f6099a, ensuring the correct version for your architecture; 3. Open the downloaded .dmg file, drag Docker to the Applications folder, and complete the installation; 4. Launch Docker from Applications, allow permissions if prompted, and wait for the whale icon to appear in the menu bar, noting that Apple Silicon Macs automatically use ARM64; 5. Verify installation by running docker --version and docker run hello-world in Terminal to confirm functionality; 6. Optionally, ensure CLI tools like docker and docker-compose are linked, though this is usually done automatically; 7. Optionally, configure settings such as CPU, memory, disk usage, Kubernetes, and file sharing via the Docker menu bar icon. Docker is now fully installed and ready for use.

How to install Docker on Mac?

Installing Docker on a Mac is straightforward thanks to Docker Desktop, which provides a complete development environment with a GUI and command-line tools. Here’s how to get it up and running:

How to install Docker on Mac?

1. Check System Requirements

Before installing, make sure your Mac meets the requirements:

  • macOS 10.15 (Catalina) or newer (including macOS Sonoma)
  • Intel or Apple Silicon (M1/M2) chip
  • At least 4GB of RAM (8GB recommended)
  • Virtualization enabled (usually on by default)

Docker Desktop uses a lightweight VM to run Linux containers, so your Mac needs to support virtualization.

How to install Docker on Mac?

2. Download Docker Desktop for Mac

Go to the official Docker website:

? //m.sbmmt.com/link/58f170c366f582dba770b94119f6099a

How to install Docker on Mac?

Click the download button for Mac. The site will automatically detect your OS and offer the correct version (Intel or Apple Silicon).

3. Install Docker Desktop

Once the .dmg file downloads:

  1. Open it (usually by clicking the file in your Downloads folder).
  2. Drag the Docker icon into the Applications folder.
  3. Wait for the copy to finish, then close the installer window.

4. Launch Docker

  • Open ApplicationsDocker and double-click to launch.
  • The first time you run it, macOS may ask for permission — allow it to run.
  • Docker will start and appear in your menu bar (whale icon ?).
  • It may take a minute to initialize, especially on first launch.

⚠️ If you're on Apple Silicon (M1/M2), Docker Desktop automatically uses the ARM64 version — no extra steps needed.

5. Verify the Installation

Open Terminal and run:

docker --version

You should see something like:

Docker version 24.0.7, build afdd53b

Then test it with a simple container:

docker run hello-world

If everything works, you’ll see a message confirming Docker is running correctly.

6. (Optional) Enable Shell Completion and CLI Tools

Docker Desktop includes docker, docker-compose, and shell completion. To use them in your terminal:

  • Make sure Docker is running.
  • Run this once to link the CLI:
ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker

(Usually done automatically — just verify docker works in your shell.)

7. Configure Docker (Optional)

Click the Docker menu bar icon → Settings to:

  • Adjust CPU, memory, and disk usage
  • Enable Kubernetes
  • Configure file sharing
  • Set startup preferences

That’s it! Docker is now installed and ready to use on your Mac.

No complex setup, no manual containerd or daemon config — Docker Desktop handles it all. Just keep it running in the background when you're working with containers.

The above is the detailed content of How to install Docker on Mac?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1511
276
How to install Docker on Mac? How to install Docker on Mac? Jul 26, 2025 am 05:55 AM

DockercanbeinstalledonaMacusingDockerDesktopbyfollowingthesesteps:1.VerifyyourMacmeetstherequirements—macOS10.15ornewer,IntelorAppleSiliconchip,atleast4GBRAM,andvirtualizationenabled;2.DownloadDockerDesktopfromhttps://www.docker.com/products/docker-d

How to uninstall Docker? How to uninstall Docker? Jul 28, 2025 am 12:02 AM

OnWindows,uninstallDockerDesktopviaSettings→Apps,thenremoveleftoverfilesinWSLwithsudorm-rf/var/lib/docker.2.OnmacOS,quitDockerDesktop,moveDocker.apptoTrash,anddeleteconfigurationfilesfrom~/Library.3.OnUbuntu/Debian,stoptheservice,purgeDockerpackagesw

How to back up a Docker container with its data? How to back up a Docker container with its data? Jul 26, 2025 am 02:59 AM

TobackupaDockercontainerwithitsdata,firstbackupnamedvolumesusingatemporarycontainertocreateatarballofthevolumecontents.2.Next,preservethecontainerconfigurationbyexportingitwithdockerinspector,preferably,bydefiningitinaDockerComposefile.3.Finally,back

How to copy files from host to Docker container? How to copy files from host to Docker container? Jul 27, 2025 am 02:37 AM

Use the dockercp command to copy files from the host to the Docker container without the need to run the container; 2. Ensure that the container exists and execute dockercp/path/on/hostfile.txtcontainer-name:/path/in/container; 3. If the target directory does not exist, you need to create it first. When copying the entire folder, the content will be copied recursively. After the operation is completed, the file will be available in the container, without rebuilding the image or mounting the volume.

How to run GUI applications in a Docker container? How to run GUI applications in a Docker container? Jul 27, 2025 am 12:25 AM

To run the GUI application in the Docker container, you must share the host display service and configure the permissions correctly: 1. Run xhost local:docker on Linux to allow the container to access X11; 2. Mount /tmp/.X11-unix and DISPLAY environment variables when starting the container; 3. Ensure that X11-related dependencies are installed in the mirror; 4. Optionally add GPU, audio, and input device support; 5. Or use VNC/NoVNC solution to achieve cross-platform secure access; 6. MacOS needs to install XQuartz and set DISPLAY as the host IP; 7. Windows needs to cooperate with VcXsrv and other X servers through WSL2 and configure DISPLAY and configure DISPLAY through WSL2 and use VcXsrv and other X servers and configure DISPLAY

How do you troubleshoot Docker Compose errors? How do you troubleshoot Docker Compose errors? Jul 18, 2025 am 02:45 AM

When DockerCompose behaves abnormally, you should first check the log to locate the root cause of the problem, then verify that the configuration file is correct, and finally try to rebuild the service cleanly. 1. Use docker-composelogs to view the log output of the overall or specified service, and combine the --tail and -f parameters to improve the troubleshooting efficiency; 2. Verify the YAML file syntax and configuration items through docker-composeconfig, check key settings such as dependencies, port mapping and environment variables; 3. Execute docker-composedown and docker-composeup-build to rebuild the service, add -v to clear old data if necessary, or start the problem service separately.

How do you deploy applications to a Docker Swarm cluster? How do you deploy applications to a Docker Swarm cluster? Jul 21, 2025 am 02:05 AM

The key to deploying applications to DockerSwarm is to use services rather than standalone containers, and to manage configurations, keys, and rolling updates through built-in tools. 1. First, containerize the application and push it to a mirror repository accessible to the Swarm node; 2. Use dockerservicecreate to define the service and its expected state, such as replica count, port mapping, etc.; 3. Use dockersecret and dockerconfig to manage sensitive information and non-sensitive configurations respectively and reference them in the service; 4. Use dockerservicescale to achieve scaling, use dockerserviceupdate to perform interrupted version updates, and can control the update policy through parameters.

How do you set resource limits (CPU, memory) for a Docker container? How do you set resource limits (CPU, memory) for a Docker container? Jul 24, 2025 am 12:33 AM

To limit resource usage of Docker containers, you can specify CPU and memory limits through command line parameters when running the container. The specific methods are as follows: 1. Use --memory (or -m) to set the memory upper limit, such as --memory="512m" means the limit is 512MB RAM; 2. Use --memory-swap to set the total memory plus swap space, such as --memory-swap="1g" means a total of 1GB available; 3. Use --cpus to limit the number of CPU cores, such as --cpus="1.5" means that up to 1.5 CPU cores are used; 4. Use --cpu-s

See all articles