brew install docker 不包括 docker 引擎?

新手上路,请多包涵

尝试从 brew 设置 docker,但是引擎似乎没有包含在任何官方公式中。

 brew install docker-machine docker-compose

所以这些只安装客户端?引擎/守护进程没有小桶吗?

原文由 David Karlsson 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.2k
2 个回答

请尝试运行

brew install docker

这将安装 Docker 引擎,这将需要 Docker-Machine (+ VirtualBox) 在 Mac 上运行。

如果你想安装 Docker for Mac ,它 不需要 virtualbox ,你可以通过 Homebrew 的 Cask 安装它:

 brew install --cask docker
open /Applications/Docker.app

原文由 nwinkler 发布,翻译遵循 CC BY-SA 4.0 许可协议

以下步骤在 macOS Sierra 10.12.4 上运行良好。请注意,在 brew 安装 Docker 后, docker 命令(符号链接)在 /usr/local/bin 不可用。首次运行 Docker 应用程序会创建此符号链接。请参阅下面的详细步骤。

  1. 安装 Docker。
    brew install --cask docker

  1. 启动 Docker。

    • + Space 调出 Spotlight Search 并输入 Docker 启动 Docker。
    • Docker 需要特权访问 对话框中,单击 OK
    • 输入密码并点击 OK

以这种方式启动 Docker 时,状态菜单中会出现一个 Docker 鲸鱼图标。 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

  1. 单击状态菜单中的 docker 鲸鱼图标并等待它显示 _Docker 正在运行_。

在此处输入图像描述在此处输入图像描述

  1. 测试 docker 是否正常工作。
    $ 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

原文由 Susam Pal 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
Stack Overflow 翻译
子站问答
访问
宣传栏