Reputation: 9686
Trying to setup docker from brew, however the engine does not seem to be included in any of the any of the official formulas.
brew install docker-machine docker-compose
So these only installs the clients? Is there no keg with the engine/daemon?
Upvotes: 287
Views: 309216
Reputation: 314
OrbStack provides an unmodified Docker engine, and thus Docker CLI. I've been using it on my M2 Pro successfully.
% docker version
Client:
Version: 24.0.6
API version: 1.43
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:28:49 2023
OS/Arch: darwin/arm64
Context: orbstack
Server: Docker Engine - Community
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:31:30 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v1.7.6
GitCommit: 091922f03c2762540fd057fba91260237ff86acb
runc:
Version: 1.1.9
GitCommit: 82f18fe0e44a59034f3e1f45e475fa5636e539aa
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Upvotes: 1
Reputation: 6980
There is now alternative to Docker Desktop for Mac: colima
If you have Homebrew installed, you can install it using:
brew install colima docker
colima start
docker
installs Docker client, while colima
provides the daemon.
Upvotes: 12
Reputation: 3112
Docker Desktop for Mac is not a suitable choice for enterprise docker users as it requires a paid license to use. Rancher Desktop is a viable open-source alternative for Docker Desktop for all three major OS.
Since this question is specifically targeted at Mac OS users, I have added the steps to make it work on Mac OS.
First install Docker using homebrew.
brew install docker
Install Rancher Desktop.
In Kubernates Settings
, change container runtime to dockerd
.
Profit !
UPDATE: There's another open-source container runtime in the scene, named Colima (https://github.com/abiosoft/colima).
Upvotes: 17
Reputation: 5342
Docker desktop will not be installed if you run brew install docker
. If you've already installed it this way, first uninstall with brew uninstall docker
.
To install Docker Desktop, run:
brew install homebrew/cask/docker
Launch docker from your /Applications
folder once and enter your password, then you can run commands like docker --version
to verify the CLI is working.
Upvotes: 13
Reputation: 34164
The following steps work fine on macOS Sierra 10.12.4. Note that after brew installs Docker, the docker
command (symbolic link) is not available at /usr/local/bin
. Running the Docker app for the first time creates this symbolic link. See the detailed steps below.
Install Docker.
brew install --cask docker
Launch Docker.
Docker
to launch Docker.When Docker is launched in this manner, a Docker whale icon appears in the status menu. As soon as the whale icon appears, the symbolic links for docker
, docker-compose
, docker-credential-osxkeychain
and docker-machine
are created in /usr/local/bin
.
$ ls -l /usr/local/bin/docker*
lrwxr-xr-x 1 susam domain Users 67 Apr 12 14:14 /usr/local/bin/docker -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker
lrwxr-xr-x 1 susam domain Users 75 Apr 12 14:14 /usr/local/bin/docker-compose -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-compose
lrwxr-xr-x 1 susam domain Users 90 Apr 12 14:14 /usr/local/bin/docker-credential-osxkeychain -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-credential-osxkeychain
lrwxr-xr-x 1 susam domain Users 75 Apr 12 14:14 /usr/local/bin/docker-machine -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-machine
Click on the docker whale icon in the status menu and wait for it to show Docker is running.
Test that docker works fine.
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
$ docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: darwin/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: c6d412e
Built: Fri Mar 24 00:00:50 2017
OS/Arch: linux/amd64
Experimental: true
Upvotes: 564
Reputation: 37797
To install Docker for Mac with homebrew:
brew install homebrew/cask/docker
To install the command line completion:
brew install bash-completion
brew install docker-completion
brew install docker-compose-completion
brew install docker-machine-completion
Upvotes: 48
Reputation: 11028
For reinstall docker, you should run:
brew reinstall homebrew/cask/docker
Upvotes: 2
Reputation: 54427
Please try running
brew install docker
This will install the Docker engine, which will require Docker-Machine (+ VirtualBox) to run on the Mac.
If you want to install the newer Docker for Mac, which does not require virtualbox, you can install that through Homebrew's Cask:
brew install --cask docker
open /Applications/Docker.app
Upvotes: 340