debian12 如何使用 apt 一键安装 docker-compose V2 版本?
仓库里面自带的,还是 python 写的 v1 版本,我要安装 golang 写的 v2 版本
ops@es-redis-20240228:~/opt/redis$ sudo apt install docker-compose
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
docker-buildx-plugin docker-compose-plugin libltdl7 libslirp0 pigz slirp4netns
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cgroupfs-mount containerd criu docker.io libbinutils libctf-nobfd0 libctf0 libgprofng0 libintl-perl libintl-xs-perl
libjansson4 libmodule-find-perl libmodule-scandeps-perl libnet1 libnftables1 libnl-3-200 libproc-processtable-perl libprotobuf32 libsort-naturally-perl libterm-readkey-perl
needrestart python3-attr python3-distro python3-distutils python3-docker python3-dockerpty python3-docopt python3-dotenv python3-json-pointer python3-jsonschema python3-lib2to3
python3-protobuf python3-pyrsistent python3-rfc3987 python3-texttable python3-uritemplate python3-webcolors python3-websocket runc tini
Suggested packages:
binutils-doc containernetworking-plugins docker-doc aufs-tools btrfs-progs debootstrap rinse rootlesskit xfsprogs zfs-fuse | zfsutils-linux needrestart-session | libnotify-bin
iucode-tool python-attr-doc python-jsonschema-doc
The following packages will be REMOVED:
containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cgroupfs-mount containerd criu docker-compose docker.io libbinutils libctf-nobfd0 libctf0 libgprofng0 libintl-perl
libintl-xs-perl libjansson4 libmodule-find-perl libmodule-scandeps-perl libnet1 libnftables1 libnl-3-200 libproc-processtable-perl libprotobuf32 libsort-naturally-perl
libterm-readkey-perl needrestart python3-attr python3-distro python3-distutils python3-docker python3-dockerpty python3-docopt python3-dotenv python3-json-pointer
python3-jsonschema python3-lib2to3 python3-protobuf python3-pyrsistent python3-rfc3987 python3-texttable python3-uritemplate python3-webcolors python3-websocket runc tini
0 upgraded, 44 newly installed, 4 to remove and 2 not upgraded.
Need to get 75.6 MB of archives.
After this operation, 32.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:2 https://deb.debian.org/debian bookworm/main amd64 runc amd64 1.1.5+ds1-1+deb12u1 [2710 kB]
Get:3 https://deb.debian.org/debian bookworm/main amd64 containerd amd64 1.6.20~ds1-1+b1 [25.9 MB]
Get:4 https://deb.debian.org/debian bookworm/main amd64 tini amd64 0.19.0-1 [255 kB]
Get:5 https://deb.debian.org/debian bookworm/main amd64 docker.io amd64 20.10.24+dfsg1-1+b3 [36.2 MB]
Get:6 https://deb.debian.org/debian bookworm/main amd64 binutils-common amd64 2.40-2 [2487 kB]
Get:7 https://deb.debian.org/debian bookworm/main amd64 libbinutils amd64 2.40-2 [572 kB]
Get:8 https://deb.debian.org/debian bookworm/main amd64 libctf-nobfd0 amd64 2.40-2 [153 kB]
Get:9 https://deb.debian.org/debian bookworm/main amd64 libctf0 amd64 2.40-2 [89.8 kB]
Get:10 https://deb.debian.org/debian bookworm/main amd64 libgprofng0 amd64 2.40-2 [812 kB]
直接安装 v2 的 docker 之后,自带了 compose 了,不过不是独立的命令,而是作为 docker 的子命令存在
输入
docker compose
就行