How do I install Docker and Docker Compose on Amazon Linux 2023?
Asked by
hollow-core door
I'm using an Amazon Linux 2023 instance and followed Docker's installation instructions for RHEL. When I run `sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin --assumeyes --quiet`, DNF returns `Unable to find a match` for every package. What repository or package names should I use to install Docker and Compose on this system?
Answers
Those instructions target RHEL, not Amazon Linux 2023. The package names and repositories are different, so DNF will not find the Docker CE packages unless you add a compatible Docker repository. Start by searching the Amazon Linux repositories with `dnf search docker`; that will show which Docker packages are available for your installed release.
Reply to this answer
The error means your enabled repositories do not contain those package names. Check the repository configuration and confirm the instance has outbound network access. If you intend to use Dockerโs packages, configure Dockerโs repository for the correct distribution before running the install commandโdonโt use the RHEL instructions unchanged on Amazon Linux.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions