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
EC2 with docker services
How do I install docker version 27.3.1 on Amazon Linux 2023?
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?
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