linux安装docker compose V2

Compose v2 architecture and installation instructions differ from v1。Docker Compose V2 is a major version bump release of Docker Compose. It has been completely rewritten from scratch in Golang (V1 was in Python). The installation instructions for Compose V2 differ from V1. V2 is not a standalone binary anymore, and installation scripts will have to be adjusted. Some commands are different. About

docker compose v2

[root@forward ~]# docker compose
docker: 'compose' is not a docker command.
See 'docker --help'
[root@forward ~]# mkdir -p /usr/local/lib/docker/cli-plugins
[root@forward ~]# curl -SL https://get.daocloud.io/docker/compose/releases/download/v2.1.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/lib/docker/cli-plugins/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   423  100   423    0     0    550      0 --:--:-- --:--:-- --:--:--   550
100 24.8M  100 24.8M    0     0   862k      0  0:00:29  0:00:29 --:--:-- 1457k
[root@forward ~]# chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
[root@forward ~]# docker compose version
Docker Compose version v2.1.0
[root@forward ~]#

Installing Compose V2 on Linux


版权声明:本文为zycdn原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。