First of all, let me state I'm not the most virtuous of Linux users, so bare with me... Below is a brief run-down of all the steps I took. Ultimately the question/issue is is that it seems impossible for me to get a proper docker-compose installation downloaded.
Tried 4 variations of the above command to try to install docker-compose. As shown in the URLs below.
"Line 1: Not: command not found".
It seems to be the issue that the docker-compose file is only 9kb in size. Because this is what I get back every time I use the above mentioned docker-compose install sequences.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 100 9 0 0 58 0 --:--:-- --:--:-- --:--:-- 58
This issue is sort of addressed here: https://github.com/docker/compose/issues/6268
Where it is said that the OS is not supported or that we're running a 32bit instance, but of which seem to be strange because all the above tutorials are specifically for AWS EC2 Linux 2.
fwiw 'uname -m' returns aarch64.
So, does anyone have an idea of how to get a full-sized version of docker-compose instead of the 9kb file?
Thanks!
docker compose is the compose sub-command of the docker executable (which doesn't exist in this list docs.docker.com/engine/reference/commandline/docker). docker-compose is a separate executable: docs.docker.com/compose/reference/overview.
To install Docker on an Amazon EC2 instanceConnect to your instance using SSH. For more information, see Connect to your Linux instance using SSH in the Amazon EC2 User Guide for Linux Instances. Update the installed packages and package cache on your instance. Install the most recent Docker Engine package.
followed the link to install the docker-compose link
Basically, thee are only two steps as below:
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
I tried everything here mentioned, in the end, it was a problem with the symlink. The official docker page gave me the solution.
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
If it doesn't work after that command, check if you can find docker in your bin folder, e.g. with: ls /usr/local/bin/
If you can see docker-compose there, you almost made it.
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
An easy way to check if docker-compose is there and Linux able to find it, is to use `which docker-compose, also if it is linked correctly, you will get the path to docker-compose as a response.
This worked for me on a AWS EC2 instance with Linux2 as OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With