OR博客
Docker入门(二)安装Docker-Compose
OrdinaryRoad
创建于:2021-09-27 16:49:43
0
24
191
0
安装Docker-Compose
# Docker入门系列 [Docker入门(一)安装Docker - 苗锦洲的个人博客 (ordinaryroad.top)](https://ordinaryroad.top/article/52.html) [Docker入门(二)安装Docker-Compose (ordinaryroad.top)](https://ordinaryroad.top/article/53.html) [Docker入门(三)Docker Compose部署MySQL - 苗锦洲的个人博客 (ordinaryroad.top)](https://ordinaryroad.top/article/54.html) [Docker入门(四)Docker Compose部署Redis - 苗锦洲的个人博客 (ordinaryroad.top)](https://ordinaryroad.top/article/55.html) [Docker入门(五)Docker Compose部署Spring Boot访问MySQL - 苗锦洲的个人博客 (ordinaryroad.top)](https://ordinaryroad.top/article/56.html) ## Linux安装Docker Compose Linux 上我们可以从 Github 上下载它的二进制包来使用,最新发行的版本地址:https://github.com/docker/compose/releases。 ## 运行以下命令以下载 Docker Compose 的当前稳定版本: ```bash sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose ``` 要安装其他版本的 Compose,请替换 1.29.2。 ## 将可执行权限应用于二进制文件: ```bash sudo chmod +x /usr/local/bin/docker-compose ``` ## 创建软链: ```bash sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose ``` ## 测试是否安装成功: ```bash docker-compose --version ``` ```bash docker-compose version 1.29.2, build 5becea4c ``` **注意**: 对于 alpine,需要以下依赖包: py-pip,python-dev,libffi-dev,openssl-dev,gcc,libc-dev,和 make。
评论
楼主暂时不想被别人评论哦~