如何在Mac OS安装Docker

来源:互联网 发布:unity3d难学吗 编辑:程序博客网 时间:2024/06/06 18:30

测试平台是 MacBook Air
操作系统版本是 macOS Sierra 10.12.6


1 安装 brew

正如 Ubuntu 的 apt 包管理系统和 Redhat 的 yum 包管理系统一样,Mac OS X 系统也有自己的包管理系统。其中包括有老牌的 Macports,Fink 包管理系统和苹果公司官方 Mac App Store,以及比较新的 Homebrew。

安装官方的说法,Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with OS X. 也就是说,Homebrew 是一个包管理器,用于在 Mac 上安装一些 OS X 没有的 UNIX 工具(比如著名的 wget)。

Homebrew 是基于 Ruby(Mac 电脑默认已经安装)的,我们可以执行 rudy –version 来确认一下。

$ ruby --versionruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

接着执行如下命令安装 brew

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装过程中有些地方需要按回车键确认,有些地方需要输入用户密码,根据提示操作即可。(安装过程的suo)

==> This script will install:/usr/local/bin/brew/usr/local/share/doc/homebrew/usr/local/share/man/man1/brew.1/usr/local/share/zsh/site-functions/_brew/usr/local/etc/bash_completion.d/brew/usr/local/Homebrew==> The following new directories will be created:/usr/local/Cellar/usr/local/Homebrew/usr/local/Frameworks/usr/local/bin/usr/local/etc/usr/local/include/usr/local/lib/usr/local/opt/usr/local/sbin/usr/local/share/usr/local/share/zsh/usr/local/share/zsh/site-functions/usr/local/varPress RETURN to continue or any other key to abort==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/varPassword:==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions==> /usr/bin/sudo /usr/sbin/chown luhd /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /bin/mkdir -p /Users/luhd/Library/Caches/Homebrew==> /usr/bin/sudo /bin/chmod g+rwx /Users/luhd/Library/Caches/Homebrew==> /usr/bin/sudo /usr/sbin/chown luhd /Users/luhd/Library/Caches/Homebrew==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew==> /usr/bin/sudo /usr/sbin/chown luhd /Library/Caches/Homebrew==> Downloading and installing Homebrew...remote: Counting objects: 91432, done.remote: Compressing objects: 100% (37/37), done.remote: Total 91432 (delta 21), reused 23 (delta 7), pack-reused 91388Receiving objects: 100% (91432/91432), 21.20 MiB | 256.00 KiB/s, done.Resolving deltas: 100% (66192/66192), done.From https://github.com/Homebrew/brew * [new branch]          master     -> origin/master * [new tag]             0.1        -> 0.1 * [new tag]             0.2        -> 0.2 * [new tag]             0.3        -> 0.3 * [new tag]             0.4        -> 0.4 * [new tag]             0.5        -> 0.5 * [new tag]             0.6        -> 0.6 * [new tag]             0.7        -> 0.7 * [new tag]             0.7.1      -> 0.7.1 * [new tag]             0.8        -> 0.8 * [new tag]             0.8.1      -> 0.8.1 * [new tag]             0.9        -> 0.9 * [new tag]             0.9.1      -> 0.9.1 * [new tag]             0.9.2      -> 0.9.2 * [new tag]             0.9.3      -> 0.9.3 * [new tag]             0.9.4      -> 0.9.4 * [new tag]             0.9.5      -> 0.9.5 * [new tag]             0.9.8      -> 0.9.8 * [new tag]             0.9.9      -> 0.9.9 * [new tag]             1.0.0      -> 1.0.0 * [new tag]             1.0.1      -> 1.0.1 * [new tag]             1.0.2      -> 1.0.2 * [new tag]             1.0.3      -> 1.0.3 * [new tag]             1.0.4      -> 1.0.4 * [new tag]             1.0.5      -> 1.0.5 * [new tag]             1.0.6      -> 1.0.6 * [new tag]             1.0.7      -> 1.0.7 * [new tag]             1.0.8      -> 1.0.8 * [new tag]             1.0.9      -> 1.0.9 * [new tag]             1.1.0      -> 1.1.0 * [new tag]             1.1.1      -> 1.1.1 * [new tag]             1.1.10     -> 1.1.10 * [new tag]             1.1.11     -> 1.1.11 * [new tag]             1.1.12     -> 1.1.12 * [new tag]             1.1.13     -> 1.1.13 * [new tag]             1.1.2      -> 1.1.2 * [new tag]             1.1.3      -> 1.1.3 * [new tag]             1.1.4      -> 1.1.4 * [new tag]             1.1.5      -> 1.1.5 * [new tag]             1.1.6      -> 1.1.6 * [new tag]             1.1.7      -> 1.1.7 * [new tag]             1.1.8      -> 1.1.8 * [new tag]             1.1.9      -> 1.1.9 * [new tag]             1.2.0      -> 1.2.0 * [new tag]             1.2.1      -> 1.2.1 * [new tag]             1.2.2      -> 1.2.2 * [new tag]             1.2.3      -> 1.2.3 * [new tag]             1.2.4      -> 1.2.4 * [new tag]             1.2.5      -> 1.2.5 * [new tag]             1.2.6      -> 1.2.6 * [new tag]             1.3.0      -> 1.3.0 * [new tag]             1.3.1      -> 1.3.1 * [new tag]             1.3.2      -> 1.3.2 * [new tag]             1.3.3      -> 1.3.3 * [new tag]             1.3.4      -> 1.3.4HEAD is now at 700300a76 Merge pull request #3243 from reitermarkus/PATH==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz######################################################################## 100.0%==> Pouring portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz==> Tapping homebrew/coreCloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...remote: Counting objects: 4595, done.remote: Compressing objects: 100% (4382/4382), done.remote: Total 4595 (delta 28), reused 343 (delta 6), pack-reused 0Receiving objects: 100% (4595/4595), 3.83 MiB | 118.00 KiB/s, done.Resolving deltas: 100% (28/28), done.Tapped 4373 formulae (4,642 files, 11.9MB)==> Cleaning up /Library/Caches/Homebrew...==> Migrating /Library/Caches/Homebrew to /Users/luhd/Library/Caches/Homebrew...==> Deleting /Library/Caches/Homebrew...Already up-to-date.==> Installation successful!==> Homebrew has enabled anonymous aggregate user behaviour analytics.Read the analytics documentation (and how to opt-out) here:  https://docs.brew.sh/Analytics.html==> Next steps:- Run `brew help` to get started- Further documentation:     https://docs.brew.sh

2 安装 virtualbox

3 安装 docker

原创粉丝点击