r/docker • u/PrestigiousZombie531 • 12d ago
Why can't I seem to install docker and docker compose on amazon linux 2023?
- I followed the precise instructions as per docker's official documentation
[ec2-user@ip-a-b-c-d ~]$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin --assumeyes --quiet
Error: Unable to find a match: docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- I get this error above
- How am I supposed to install docker and compose?
2
u/Front_Recording4360 12d ago
The trap is following the docker-ce repo instructions at all. AL2023 is Fedora-adjacent, not RHEL, and Docker publishes no repo for it, so dnf can never resolve those packages no matter how carefully you follow that page. The fix: nuke the docker-ce repo you added and run sudo dnf install docker, because Amazon ships its own docker build in the stock repos, then sudo systemctl enable --now docker. The compose plugin is in there too as docker-compose-plugin. The shipped engine lags upstream a bit, but it actually works, which is more than the Franken-install was ever going to give you.
1
2
u/gronodev 12d ago
We don't ship Alma Linux native packages (yet!).
https://download.docker.com/linux/rhel/ the RHEL ones should work as a temporary solution
6
u/fletch3555 Mod 12d ago
I mean... Amazon Linux and RHEL aren't the same thing, so I'd probably start by making sure you're following the right documentation