Install Docker on macOS
Docker Desktop is the way to install Docker on macOS. It runs the Docker daemon inside a small Linux virtual machine that Docker Desktop manages.
Check the install
This command shows the client and daemon versions.
docker version --format "Client: {{.Client.Version}} Server: {{.Server.Version}}"Test with hello-world
This command runs the test image. It proves the daemon answers.
docker run hello-worldExample
docker run hello-worldKey points
- Install Docker Desktop from the Docker website, then start it once.
- Apple Silicon Macs run the Apple Silicon build of Docker Desktop.
- Intel Macs run the Intel build of Docker Desktop.
- Docker Desktop starts the daemon for you when the app opens.
- Use docker version to check the install, and docker run hello-world to test it.
In this example, Docker runs the hello-world test image on macOS. The image prints its greeting and stops. The greeting proves Docker Desktop and the daemon work.
Note
Docker Desktop is free for personal use, education, and small business use.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
Which Docker Desktop build does an Apple Silicon Mac need?