followed the link to install the docker-compose link
Basically, thee are only two steps as below:
Copysudo 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
Answer from Santosh Garole on Stack Overflowfollowed the link to install the docker-compose link
Basically, thee are only two steps as below:
Copysudo 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
You can start from the scratch on Amazon Linux ec2 instance for installing Docker by following the step:
Copysudo yum update -y
sudo amazon-linux-extras install docker
sudo yum install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
Then logout from the instance and login again to verify the installation of Docker
Copydocker info
To install Docker-compose follow the below steps:
Copysudo 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
Q: Installing docker-compose on Amazon EC2 Linux 2
Rather than dynamically looking up the OS type, just specify the linux version...
sudo curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-composeMore on reddit.com
Is it possible to install Docker Compose in Amazon Linux 2023 using package manager?
Docker installation gives an error on Amazon Linux 2 when following the official documentation. Any ideas how to fix this?
mounting EFS on docker container
EFS is not supported on windows I'm afraid.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/AmazonEFS.html
More on reddit.comImportant Amazon EFS is not supported on Windows instances.
Videos
I looked this up but I can't find a way to install it using the package manager 'yum'.as indicated in the installation instructions here - "https://docs.docker.com/compose/install/linux/"
It just says that there is no match for 'docker-compose'plugin'
This is my preferred way to install it if possible. Maybe I have to add some repository so it can locate it? but I don't know how.
EDIT: to be more specific, I'm using docker that is installed part of Amazon Linux 2023 on a Lightsail instance, I did not install it myself - package version (docker-25.0.14-1.amzn2023.0.1.x86_64). Also there is no docker compose plug in that came with it as I checked that already.
On Amazon Linux 2023 the global cli-plugins directory for Docker is /usr/libexec/docker/cli-plugins/. So...
# download the latest version in the global plugins directory
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m) -o /usr/libexec/docker/cli-plugins/docker-compose
# make it executable
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-compose
# check
docker compose version
I looked around for a while before finally tracking this down.
It's here for anyone who finds themselves in the same boat.
The plugin was not installed along with docker. Here is a one-liner:
Edited:
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m) -o /usr/bin/docker-compose && sudo chmod 755 /usr/bin/docker-compose && docker-compose --version
Hi,
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.
-
Followed instructions to install docker https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
-
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Tried 4 variations of the above command to try to install docker-compose. As shown in the URLs below.
https://www.codegrepper.com/code-examples/php/how+to+install+docker+compose+in+ec2
https://portal.cloud303.io/forum/aws-1/question/i-want-to-install-docker-compose-on-an-amazon-linux-2-ec2-instance-9
https://acloudxpert.com/how-to-install-docker-compose-on-amazon
https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9
When typing "docker-compose", "sudo docker-compose" etc. All it will say is
"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!
Rather than dynamically looking up the OS type, just specify the linux version...
sudo curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose
I'd have to use yum instead of apt (I think, that's what I found you have to do on EC2). I tried this but it says there are a bunch of Python 3.6 dependencies missing. I only have 2.7 installed (by default) should I also install Python 3.6?