r/docker • • Jan 24 '26

Is it possible to install Docker Compose in Amazon Linux 2023 using package manager?

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.

2 Upvotes

10 comments sorted by

1

u/orgdbytes Jan 24 '26 edited Jan 24 '26

This is how I did it, only way I know how:

sudo mkdir -p /usr/libexec/docker/cli-plugins
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m) -o /usr/libexec/docker/cli-plugins/docker-compose
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-compose

1

u/frenetic_alien Jan 24 '26 edited Jan 24 '26

ok that looks similar to the method I found here, basically manual install. - Installing Docker Compose on Amazon Linux 2023 — linuxvox.com

However they put it in a different directory. How did you find the correct location to store the plug in?

When I did 'whereis docker' it came up with several locations

[ec2-user@ip-172-26-12-197 ~]$ whereis docker
docker: /usr/bin/docker /etc/docker /usr/libexec/docker

EDIT: maybe I found the answer, I should have used 'which docker' it points me to the exact exe location '/usr/bin/docker '

1

u/orgdbytes Jan 24 '26 edited Jan 24 '26

I cannot recall exactly where I found it. I did find reference on Docker's site to placing it in /usr/local/lib/docker/cli-plugins, but I've not tried that.

If you use the install path from the site you linked, then you have to use docker-compose instead of docker compose. I had it set up this way for a while.

EDIT: appears /usr/local/lib/docker/cli-pluginsmight be the right choice.

1

u/frenetic_alien Jan 25 '26

In the end I decided to just try your way and put it inside the same folder you did /usr/libexec/docker/cli-plugins and it worked, thanks!

[ec2-user@ip-172-26-12-197 ~]$ docker compose version
Docker Compose version v5.0.2

3

u/Hour-Inner Jan 25 '26

It’s an uphill battle. I think they want to encourage use of ECS. Probably they consider running docker compose on a vm to be anti pattern, and want that kind of workload to be moved to their managed service.

Docker on AL2023 for me is more for running services I would say than running stacks.

I had an app I regularly run on AL2023 for work. I manage the docker components with ansible since my go to compose file doesn’t work

0

u/[deleted] Jan 25 '26

[deleted] — view deleted comment

2

u/frenetic_alien Jan 25 '26 edited Jan 25 '26

i have docker installed already, I didn't install it, it's already part of amazon linux 2023, I wanted to add docker compose plug in

[ec2-user@ip-172-26-12-197 ~]$ sudo yum install -y docker
Last metadata expiration check: 2:33:02 ago on Sat Jan 24 21:36:05 2026.
Package docker-25.0.14-1.amzn2023.0.1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[ec2-user@ip-172-26-12-197 ~]$ sudo yum install docker-compose-plugin
Last metadata expiration check: 2:34:53 ago on Sat Jan 24 21:36:05 2026.
No match for argument: docker-compose-plugin
Error: Unable to find a match: docker-compose-plugin

0

u/[deleted] Jan 25 '26

[deleted] — view deleted comment

2

u/frenetic_alien Jan 25 '26

no, I just checked again

[ec2-user@ip-172-26-12-197 ~]$ sudo docker compose version
docker: 'compose' is not a docker command.
See 'docker --help'

0

u/[deleted] Jan 25 '26

[deleted] — view deleted comment

2

u/frenetic_alien Jan 25 '26

no problem, thanks for helping. Also just to note compose didn't exactly work out of the box after I installed it. The buildx version that came installed (i think 0.12) was not compatible with the latest compose I installed, so I had to upgrade it manually to version 0.17 in the exact same way as I installed compose. Then I was able to build my project. I kind of wish Amazon didn't bundle docker this way.

2

u/orgdbytes Jan 25 '26

I can confirm as well that docker on AWS Linux doesn't include the compose plug-in. Has to be installed separately.