51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

docker-compose 升级-2.24.6

docker compose 升级

docker-compose 升级

如果遇到这样的问题,就需要升级了

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.

whereis docker-compose

/usr/bin/docker-compose

根据上一步的whereis找到了docker-compose的路径为:/usr/bin/docker-compose,所以下面的脚本,路径也替换为这个就可以了。

下载一个

快速连接:

wget https://gitee.com/wang-huamao/soft/raw/master/docker/docker-compose-linux-x86_64-2.24.6

官方连接:

https://github.com/docker/compose/releases/

或直接下载centos地址

https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-linux-x86_64

改名

mv docker-compose-linux-x86_64 docker-compose

chmod +x docker-compose

mv docker-compose /usr/bin/

检查

docker-compose  version

赞(8)
未经允许不得转载:工具盒子 » docker-compose 升级-2.24.6