I'm running Amazon Linux 2023 on an EC2 instance and tried installing Docker with the package names from Docker's RHEL instructions: `docker-ce`, `docker-ce-cli`, `containerd.io`, `docker-buildx-plugin`, and `docker-compose-plugin`. DNF returns "Unable to find a match" for all of them. The instance has outbound network access. What is the correct way to install Docker and Docker Compose on Amazon Linux 2023?
3 Answers
Those instructions target RHEL, not Amazon Linux, so the package names and repositories don’t necessarily apply. First check what Amazon’s repositories provide with `dnf search docker` or `dnf list available '*docker*'`. On Amazon Linux 2023, the usual installation is `sudo dnf install -y docker`, followed by `sudo systemctl enable --now docker`. If you want to run Docker without `sudo`, add your login user to the Docker group with `sudo usermod -aG docker ec2-user`, then log out and back in. Docker Compose may need to be installed separately if the Compose plugin isn’t available in the Amazon Linux repositories.
A network connection alone doesn’t guarantee that DNF can see the packages. Check the enabled repositories and package metadata with `dnf repolist` and `sudo dnf makecache`. If `dnf search docker` shows no Docker packages, the issue is repository configuration rather than Docker itself.
The Docker packages won’t appear until the appropriate package repository is configured, which is what the RHEL documentation’s repository section is referring to. However, adding a RHEL repository to Amazon Linux is not generally the right fix. Use Amazon Linux’s own repositories and inspect the available package names with DNF; `docker-ce` may not be provided even though a package named `docker` is.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures