mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-26 15:06:18 +00:00
translate install/mac.md
This commit is contained in:
parent
b54b5b0a0f
commit
d47f565e83
@ -1,46 +1,46 @@
|
||||
## macOS 安装 Docker Desktop CE
|
||||
## Install Docker Desktop CE on maxOS
|
||||
|
||||
### 系统要求
|
||||
### OS Requirement
|
||||
|
||||
[Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/) 要求系统最低为 macOS El Capitan 10.11。
|
||||
The minimum OS version requirement [Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/) is macOS El Capitan 10.11.
|
||||
|
||||
### 安装
|
||||
### Installation
|
||||
|
||||
#### 使用 Homebrew 安装
|
||||
#### Install with Homebrew
|
||||
|
||||
[Homebrew](https://brew.sh/) 的 [Cask](https://caskroom.github.io/) 已经支持 Docker Desktop for Mac,因此可以很方便的使用 Homebrew Cask 来进行安装:
|
||||
The [Cask](https://caskroom.github.io/) of [Homebrew](https://brew.sh/) has already supported Docker Desktop for Mac, so we can instrall it with Homebrew Cask easily.
|
||||
|
||||
```bash
|
||||
$ brew cask install docker
|
||||
```
|
||||
|
||||
#### 手动下载安装
|
||||
#### Download and Install Manually
|
||||
|
||||
如果需要手动下载,请点击以下链接下载 [Stable](https://download.docker.com/mac/stable/Docker.dmg) 或 [Edge](https://download.docker.com/mac/edge/Docker.dmg) 版本的 Docker Desktop for Mac。
|
||||
If you need to download `Docker Desktop for Mac` manually, please click the [Stable](https://download.docker.com/mac/stable/Docker.dmg) or [Edge](https://download.docker.com/mac/edge/Docker.dmg) link to downlaod it.
|
||||
|
||||
如同 macOS 其它软件一样,安装也非常简单,双击下载的 `.dmg` 文件,然后将那只叫 [Moby](https://blog.docker.com/2013/10/call-me-moby-dock/) 的鲸鱼图标拖拽到 `Application` 文件夹即可(其间需要输入用户密码)。
|
||||
Just as other softwares on macOS, the installation of Docker Desktop for macOS is easy. You only need to double click the `.dmg` file, and then drag the whale([Moby](https://blog.docker.com/2013/10/call-me-moby-dock/)) icon to the `Applications` folder. During the process, you will be prompted to enter your password for your mac.
|
||||
|
||||
![](_images/install-mac-dmg.png)
|
||||
|
||||
### 运行
|
||||
### Run
|
||||
|
||||
从应用中找到 Docker 图标并点击运行。
|
||||
Find the Docker icon from your applications, and double click the icon to run Docker Desktop.
|
||||
|
||||
![](_images/install-mac-apps.png)
|
||||
|
||||
运行之后,会在右上角菜单栏看到多了一个鲸鱼图标,这个图标表明了 Docker 的运行状态。
|
||||
After running, there should be a whale icon on the top right bar of your mac desktop. This icon indicates the running status of Docker.
|
||||
|
||||
![](_images/install-mac-menubar.png)
|
||||
|
||||
第一次点击图标,可能会看到这个安装成功的界面,点击 "Got it!" 可以关闭这个窗口。
|
||||
For the first time clicking on the icon, you may see the successful installation window. Clicking on "Got it!" will close the window.
|
||||
|
||||
![](_images/install-mac-success.png)
|
||||
|
||||
以后每次点击鲸鱼图标会弹出操作菜单。
|
||||
Clicking on the whale icon each time afterwards will show you the operation menu.
|
||||
|
||||
![](_images/install-mac-menu.png)
|
||||
|
||||
启动终端后,通过命令可以检查安装后的 Docker 版本。
|
||||
After opening the terminal, you can check the newly-installed Docker version with commands.
|
||||
|
||||
```bash
|
||||
$ docker --version
|
||||
@ -51,27 +51,28 @@ $ docker-machine --version
|
||||
docker-machine version 0.16.1, build cce350d7
|
||||
```
|
||||
|
||||
如果 `docker version`、`docker info` 都正常的话,可以尝试运行一个 [Nginx 服务器](https://hub.docker.com/_/nginx/):
|
||||
If `docker version` and `docker info` shows no error nor warning, you can try to run an [Nginx Server](https://hub.docker.com/_/nginx/).
|
||||
|
||||
|
||||
```bash
|
||||
$ docker run -d -p 80:80 --name webserver nginx
|
||||
```
|
||||
|
||||
服务运行后,可以访问 <http://localhost>,如果看到了 "Welcome to nginx!",就说明 Docker Desktop for Mac 安装成功了。
|
||||
When the sever is up and running, you can visit <http://localhost>, if you see "Welcome to nginx!", it means the installation of Docker Desktop for macOS is successful.
|
||||
|
||||
![](_images/install-mac-example-nginx.png)
|
||||
|
||||
要停止 Nginx 服务器并删除执行下面的命令:
|
||||
To stop the Nginx server and delete it, you can execute the following commands:
|
||||
|
||||
```bash
|
||||
$ docker stop webserver
|
||||
$ docker rm webserver
|
||||
```
|
||||
|
||||
### 镜像加速
|
||||
### Registry Mirror(In China)
|
||||
|
||||
如果在使用过程中发现拉取 Docker 镜像十分缓慢,可以配置 Docker [国内镜像加速](mirror.md)。
|
||||
If you pull docker images very slowly, then you can configure [Registry Mirror](mirror.md).
|
||||
|
||||
### 参考链接
|
||||
### References
|
||||
|
||||
* [官方文档](https://docs.docker.com/docker-for-mac/install/)
|
||||
* [Official Document](https://docs.docker.com/docker-for-mac/install/)
|
||||
|
Loading…
Reference in New Issue
Block a user