简体   繁体   中英

Installed Docker-Compose 2.0 but for some reason it is using an a 1.0 version

I attempted to update Docker-Compose in Linux using the instructions on the Docker Website. I get the following when I type sudo apt install docker-compose-plugin

After this operation, 25.7 MB of additional disk space will be used.
Selecting previously unselected package docker-compose-plugin.
(Reading database ... 139053 files and directories currently installed.)
Preparing to unpack .../docker-compose-plugin_2.10.2~ubuntu-jammy_amd64.deb ...
Unpacking docker-compose-plugin (2.10.2~ubuntu-jammy) ...
Setting up docker-compose-plugin (2.10.2~ubuntu-jammy) ...

When I try to type docker compose it does not work. When I type docker-compose version I see:

docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.6.9

What step am I missing? I want to be able to use a 2.0 version with the docker compose type entry. Thank you.

For some reason, Docker was installed as a Snap Packaging rather than the suggested method on the Docker website to use apt. I could not find a way to snap install or update docker-compose on its own with Snap. I just uninstall docker with sudo snap remove docker , then reinstalled using the most up to date directions on Docker's site, using apt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM