Yum Install Docker Amazon Linux

Amazon Linux 2 - no Docker executable?
Posted on: Feb 9, 2021 7:42 PM
I have an EC2 instance I spun up this year (2021) and for the life of me can not get 'docker' available.. I was able to install docker, but the result is that 'dockerd', 'docker-init' and 'docker-proxy' are available, but not 'docker'.
In order to get docker installed at all I had to first install 'selinux-ng':
sudo amazon-linux-extras install selinux-ng
Then I was able to run:
sudo amazon-linux-extras install docker
But then attempting to install with yum gives me the following:
sudo yum install docker
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
+Package docker-19.03.13ce-1.amzn2.x86_64 is obsoleted by moby-engine-20.10.2+azure-1.x86_64 which is already installed+
Nothing to do
But .. no docker executable, just the daemon, proxy and docker-init.
docker --version
-bash: docker: command not found
Has anyone come across this before? Found a fix? Should I be using some new 'moby' command instead?
Here's my exact OS:
NAME='Amazon Linux'
ID_LIKE='centos rhel fedora'
PRETTY_NAME='Amazon Linux 2'
Edited by: KrisM on Feb 9, 2021 7:42 PM
Replies: 1 Pages: 1 - Last Post: Feb 9, 2021 8:35 PM by: KrisM
Re: Amazon Linux 2 - no Docker executable?
Posted on: Feb 9, 2021 8:35 PM
So... ugh.
Since this is a build machine, I had previously installed dotnet to be able to compile .Net Core apps. That was as simple as :
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-3.1
Well, that must have installed Azure+Moby along with it.. Either that, or installing Azure deployment plugins in Jenkins was able to install the moby-engine-20.10.2+azure-1.x86_64 package. Either way, I'm chalking it up to one of those two culprits.
I ended up removing that package along with a small handful of other moby related packages and removed the 'microsoft-prod.repo' form my yum repos folder (/etc/yum.repos.d) because otherwise attempting to install docker kept landing on the Microsoft Azure/Moby version (which I don't want).
Dotnet is still building fine. I suspect I may run into trouble running Azure publish commands, but at least now I'll know why and where to fix it.
Reply to this Thread
Answered question
Unanswered question with answer points still available
Unanswered question
Ace: 2000+ pts
Expert: 750-1999 pts
Guide: 300-749 pts
Enthusiast: 50-299 pts
Newbie: 5-49 pts
  1. Install Docker Linux
Yum install docker amazon linux python 3 6
Yum Install Docker Amazon Linux

Install Docker Linux

How to install docker in Amazon Linux 01 Sep 2019. The usage of Docker is growing more and more. Our daily development tends to depend on the container platform highly. But I found AWS Linux I recently launched does not have Docker engine as default. It is a frustrating situation even I just want to use Docker in AWS environment. Install docker using yum $ sudo yum install docker -y. Add ec2-user to the docker group $ sudo usermod -aG docker ec2-user. Command to check if docker is running $ sudo service docker status. If docker is inactive (dead) then start using this command $ sudo service docker start. Run below command to make sure that the docker. To get Docker running on the AWS AMI you should follow the steps below (these are all assuming you have ssh'd on to the EC2 instance). Update the packages on your instance. ec2-user $ sudo yum update -y. ec2-user $ sudo yum install docker -y. Start the Docker Service. ec2-user $ sudo service docker start.

Most Viewed Posts