2015-05-08 20:10:34 +08:00
|
|
|
|
## 安装
|
2017-11-23 01:22:25 +08:00
|
|
|
|
|
2017-11-30 18:28:23 +08:00
|
|
|
|
Docker Machine 可以在多种操作系统平台上安装,包括 Linux、macOS,以及 Windows。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
### macOS、Windows
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2019-09-01 15:03:32 +08:00
|
|
|
|
`Docker Desktop for Mac/Windows` 自带 `docker-machine` 二进制包,安装之后即可使用。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
查看版本信息。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2016-11-10 19:48:32 +08:00
|
|
|
|
```bash
|
2015-07-16 15:34:54 +08:00
|
|
|
|
$ docker-machine -v
|
2019-09-01 14:50:40 +08:00
|
|
|
|
docker-machine version 0.16.1, build cce350d7
|
2015-07-16 15:34:54 +08:00
|
|
|
|
```
|
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
### Linux
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
在 Linux 上的也安装十分简单,从 [官方 GitHub Release](https://github.com/docker/machine/releases) 处直接下载编译好的二进制文件即可。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
例如,在 Linux 64 位系统上直接下载对应的二进制包。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2016-11-10 19:48:32 +08:00
|
|
|
|
```bash
|
2019-09-01 14:50:40 +08:00
|
|
|
|
$ sudo curl -L https://github.com/docker/machine/releases/download/v0.16.1/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine
|
|
|
|
|
|
2017-11-30 18:28:23 +08:00
|
|
|
|
$ sudo chmod +x /usr/local/bin/docker-machine
|
2017-11-23 01:22:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
2017-11-30 18:28:23 +08:00
|
|
|
|
完成后,查看版本信息。
|
2015-07-16 15:34:54 +08:00
|
|
|
|
|
2017-11-23 01:22:25 +08:00
|
|
|
|
```bash
|
|
|
|
|
$ docker-machine -v
|
2019-09-01 14:50:40 +08:00
|
|
|
|
docker-machine version 0.16.1, build cce350d7
|
2015-07-16 15:34:54 +08:00
|
|
|
|
```
|