I am trying to get started with DevOps as these are basics for me to get started , I am trying to install the stand-alone docker composition , but end up having this situation ,
$ curl -SL https://github.com/docker/compose/releases/download/v2.39.4/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0Warning: Failed to open the file /usr/local/bin/docker-compose: Permission
Warning: denied
0 72.8M 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
curl: (23) client returned ERROR on write of 1365 bytes
I have followed this steps , but it is throwing me an error , can someone please help me with this.
It seems the user you are downloading the file with does not have permissions to write to /usr/local/bin. So this is rather a Linux permission (knowledge) issue than Docker related.
Start by learning about Linux file permissions (1, 2).
Then 1) use a user with according permissions to download the file to the folder,
or 2) add the permissions (groups) to the current user
or 3) change the folder permissions to allow the current user to write there
or 4) download the file to a different folder and later call it with full path
Either you have root access and use sudo to download or move the plugin to /usr/local/bin or read the guide in the documentation to install the plugin in your home folder.
Note: You followed the “Standalone” installation method. But you want to use Compose v2, which works as a plugin. The original path could still work, but better using the plugin method.