官方前言
安装
三级目录
一、官方前言
Install Compose on Linux systems
On Linux, you can download the Docker Compose binary from the Compose repository release page on GitHub. Follow the instructions from the link, which involve running the curl command in your terminal to download the binaries. These step-by-step instructions are also included below.
For alpine, the following dependency packages are needed: py-pip, python-dev, libffi-dev, openssl-dev, gcc, libc-dev, and make.
二、安装
要安装其他版本的Compose,请替换1.26.0 为要使用的Compose版本。
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
如果命令docker-compose在安装后失败,请检查您的路径。您也可以创建指向/usr/bin或路径中任何其他目录的符号链接。
例如
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
执行完成后执行docker-compose version 验证是否安装成功
docker-compose --version
完成