docker_practice/compose/install.md

69 lines
2.0 KiB
Go
Raw Normal View History

#
2015-05-08 20:10:01 +08:00
`Compose` LinuxmacOSWindows 10
2016-12-20 15:35:52 +08:00
`Compose` Python `pip` 使 Docker
2016-12-20 15:35:52 +08:00
`Docker Desktop for Mac/Windows` `docker-compose` Docker 使
2017-11-23 15:48:52 +08:00
```bash
$ docker-compose --version
docker-compose version 1.25.5, build 4667896b
2017-11-23 15:48:52 +08:00
```
Linux 使
##
2017-11-23 15:48:52 +08:00
Linux [ GitHub Release](https://github.com/docker/compose/releases) 处直接下载编译好的二进制文件即可。
2017-11-23 15:48:52 +08:00
Linux 64
2017-11-23 15:48:52 +08:00
```bash
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
2017-11-23 15:48:52 +08:00
```
## PIP
2017-11-23 15:48:52 +08:00
** `x86_64` Linux `ARM` ()使 `pip`
2017-11-23 15:48:52 +08:00
2016-12-20 15:35:52 +08:00
Compose Python pip
2015-05-08 20:10:01 +08:00
2017-11-22 11:13:23 +08:00
```bash
2015-05-08 20:10:01 +08:00
$ sudo pip install -U docker-compose
```
2016-12-20 15:35:52 +08:00
2017-11-23 15:48:52 +08:00
2017-11-22 11:13:23 +08:00
```bash
2016-12-20 15:35:52 +08:00
Collecting docker-compose
Downloading docker-compose-1.25.5.tar.gz (149kB): 149kB downloaded
2016-12-20 15:35:52 +08:00
...
Successfully installed docker-compose cached-property requests texttable websocket-client docker-py dockerpty six enum34 backports.ssl-match-hostname ipaddress
```
## bash
2015-05-08 20:10:01 +08:00
2017-11-22 11:13:23 +08:00
```bash
$ curl -L https://raw.githubusercontent.com/docker/compose/1.25.5/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
2016-12-20 15:35:52 +08:00
```
##
2017-11-23 15:48:52 +08:00
2016-12-20 15:35:52 +08:00
2017-11-22 11:13:23 +08:00
```bash
2016-12-20 15:35:52 +08:00
$ sudo rm /usr/local/bin/docker-compose
```
2017-11-26 09:54:04 +08:00
`pip`
2015-05-08 20:10:01 +08:00
2017-11-22 11:13:23 +08:00
```bash
2016-12-20 15:35:52 +08:00
$ sudo pip uninstall docker-compose
2017-11-01 00:20:30 +08:00
```