Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Desktop mac won't update Docker Compose [closed]

I updated Docker Desktop for Mac (Intel) this morning to Docker Desktop 4.9.1. My Docker Compose version won't seem to update. When I run docker-compose --version in my terminal it returns docker-compose version 1.25.5, build unknown.

I tried installing docker-compose with Brew and after some tinkering I got confirmation that it installed version 2.6.0, however after restarting docker desktop and my computer, I still get 1.25.5 when I run docker-compose --version.

How can I force Docker to use a newer version of docker-compose?

NOTE: In my docker-compose.yml file I have version 2 running.

like image 971
drice89 Avatar asked Aug 30 '26 15:08

drice89


2 Answers

My docker compose also came via Docker Desktop on MacOS and it did not update/had the latest the latest version of docker-compose. I resolved this by installing docker-compose via brew:

https://formulae.brew.sh/formula/docker-compose

brew install docker-compose

Don't forget to follow the after-install instructions:

"Compose is now a Docker plugin. For Docker to find this plugin, symlink it:"

mkdir -p ~/.docker/cli-plugins
ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
like image 175
mangei Avatar answered Sep 01 '26 11:09

mangei


While mangers answer is correct I can't find such "after-install instruction". The current process differs. The new way to enable a plugin is to add the following section to the .docker/config.json file:

{
    "cliPluginsExtraDirs": [
        "/opt/homebrew/lib/docker/cli-plugins"
    ]  
}

Note

  • I have no other options, so I have shown you the entire file.
  • It is possible that you do not have such a directory and file (for example, if you installed Docker using Homebrew). In that case, you can create them yourself

Example:

mkdir -p ~/.docker  
cd .docker  
echo "{}" >  $HOME/.docker/config.json

Additionally, I installed Docker Compose before this:

brew install docker-compose
like image 36
Mikhail_Sam Avatar answered Sep 01 '26 09:09

Mikhail_Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!