https://rancher.com/ logo
s

salmon-art-19742

06/22/2022, 4:35 PM
I'm using Docker BuildKit so I need v2.5 so I can use docker-compose but am I missing something? should "docker compose" also show v2.5.1? On WSL it does show the same version for both. Thanks!
f

fast-garage-66093

06/22/2022, 5:44 PM
Yes, they should both be the same version. First check which
docker
binary you are calling with `where docker`:
Copy code
C:\Users\Jan>where docker
C:\Users\Jan\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\docker.exe
C:\Users\Jan\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\bin\docker
Maybe you have some other directory on your
PATH
that is shadowing the
docker
cli included in Rancher Desktop.
Then call the plugin manually to check the version:
Copy code
C:\Users\Jan>"%USERPROFILE%\.docker\cli-plugins\docker-compose.exe" version
Docker Compose version v2.5.1
You should get the same version when called through the
docker.exe
binary:
Copy code
C:\Users\Jan>"%LOCALAPPDATA%\Programs\Rancher Desktop\resources\resources\win32\bin\docker.exe" compose version
Docker Compose version v2.5.1
My guess is that you have an older version of
docker.exe
on your
PATH
first that is handling plugins differently.
s

salmon-art-19742

06/22/2022, 5:58 PM
PS C:\> get-command docker
CommandType Name Version Source ----------- ---- ------- ------ Application docker.exe 20.10.16.0 C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\docker.exe
Copy code
PS C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin> docker compose version
Docker Compose version v2.2.3
I couldn't get "where" to work - it didn't error - just didn't return anything - get-command did return the path to rancher desktop
f

fast-garage-66093

06/22/2022, 6:00 PM
where
is for cmd.exe 😄
s

salmon-art-19742

06/22/2022, 6:00 PM
On a side note thanks for that - I learn something new every day!
Copy code
C:\Users\jholben>where docker
C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\docker.exe
C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\bin\docker
f

fast-garage-66093

06/22/2022, 6:01 PM
I'm in a meeting now for 1h, but try to call the embedded docker-compose.exe from the
cli-plugins
directory and check the version.
If it isn't 2.5.1, then there is something wrong with your RD
s

salmon-art-19742

06/22/2022, 6:08 PM
Copy code
It's deployed twice somehow - the .docker folder has the v2.2.3 and then AppData folder has the v2.5.1
Copy code
C:\Users\jholben\.docker\cli-plugins>where docker-compose
C:\Users\jholben\.docker\cli-plugins\docker-compose.exe
C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\docker-compose.exe
C:\Users\jholben\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\bin\docker-compose
f

fast-garage-66093

06/22/2022, 7:24 PM
Hmm, that means that the plugin was not installed properly by 1.4.1. Can you open a Github issue with this information?
On Linux and macOS we just install symlinks; I will have to look up what we do on Windows:
Copy code
$ ls -l ~/.docker/cli-plugins
total 0
lrwxr-xr-x  1 jan  staff  32 17 Jun 09:53 docker-buildx -> /Users/jan/.rd/bin/docker-buildx
lrwxr-xr-x  1 jan  staff  33 17 Jun 09:53 docker-compose -> /Users/jan/.rd/bin/docker-compose
I suspect the plugins are actually copied, and maybe for some reason the copying failed.
@proud-jewelry-46860 Do you know how this works on Windows, and if there should be something in the log files if the copying failed?
p

proud-jewelry-46860

06/22/2022, 8:33 PM
I don't think we actually did anything on Windows (that is, we left
~/.rd/cli-plugins
alone), and just added it to
PATH
? Which would make sense that the versions are incorrect.
f

fast-garage-66093

06/22/2022, 8:34 PM
There is no
~/.rd
on Windows; the plugins are installed into
~/.docker/cli-plugins
I also don't understand why the code does not log an error for
EEXIST
. That error should never be returned, as
copyFile
should overwrite the file if it doesn't exist.
s

salmon-art-19742

06/22/2022, 8:50 PM
Thanks for help guys, I created issue #2445 we just ran into this as well with a colleague's PC. As a quick workaround we just copied over the right version to get things going.
f

fast-garage-66093

06/22/2022, 8:52 PM
Thanks! The person who wrote the code is on vacation. Since you have a workaround, we are going to wait and let them deal with it 🙂
s

salmon-art-19742

06/23/2022, 1:40 AM
Sounds good! We're really enjoying Rancher - great job!
116 Views