title: Issues installing Docker on RHEL 7 Linux Server
body: <p>I have been constantly running into this issue more and more lately, and finally need some assistance because I'm completely stuck.</p>
  <p>I just got access to a RHEL EC2 Linux server and I am just simply trying to install Docker. This process has been extremely painful lately. Tons of 404 HTTP Not Found errors when trying to follow the processes mentioned online</p>
  <p>According to <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html</a>, you can just simply run one of the following two commands:</p>
  <ul>
  <li>sudo amazon-linux-extras install docker</li>
  <li>sudo yum install docker</li>
  </ul>
  <p>However, neither one of these comands work, as shown in the output below:</p>
  <pre><code>[root@d8de679d27f2454 myuser]# sudo amazon-linux-extras install docker
  sudo: amazon-linux-extras: command not found
  [root@d8de679d27f2454 myuser]# yum install docker
  Loaded plugins: amazon-id, search-disabled-repos
  No package docker available.
  Error: Nothing to do
  [root@d8de679d27f2454 myuser]#
  </code></pre>
  <p>Here is a list of things I've tried to do :</p>
  <p><em><strong>First Attempt</strong></em> (RE: <a href="https://stackoverflow.com/questions/53918841/how-to-install-docker-on-amazon-linux2">How to install docker on Amazon Linux2</a>)</p>
  <p>The second answer proposed in that you can just run the following:</p>
  <pre><code>sudo yum update -y
  sudo yum -y install docker
  </code></pre>
  <p>However, that doesn't work either, as shown in the output below:</p>
  <pre><code>[root@d8de679d27f2454 myuser]# yum update -y
  Loaded plugins: amazon-id, search-disabled-repos
  No packages marked for update
  [root@d8de679d27f2454 myuser]# yum -y install docker
  Loaded plugins: amazon-id, search-disabled-repos
  No package docker available.
  Error: Nothing to do
  [root@d8de679d27f2454 myuser]# 
  </code></pre>
  <p><em><strong>Second Attempt</strong></em>: Installing via <code>get.docker.com</code></p>
  <p>When running <code>curl https://get.docker.com | bash</code>, that doesn't work either</p>
  <p><a href="https://i.stack.imgur.com/1FWk7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1FWk7.png" alt="enter image description here" /></a></p>
  <p><em><strong>Third Attempt</strong></em>: <a href="https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/" rel="nofollow noreferrer">https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/</a></p>
  <p>Part of this article suggests running the following two commands:</p>
  <pre><code>sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  sudo yum install -y yum-utils device-mapper-persistent-data lvm2
  </code></pre>
  <p>However, that doesn't work either:</p>
  <pre><code># yum install -y yum-utils device-mapper-persistent-data lvm2
  Loaded plugins: amazon-id, product-id, search-disabled-repos, subscription-manager
  
  This system is not registered with an entitlement server. You can use subscription-manager to register.
  
  https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
  Trying other mirror.
  To address this issue please refer to the below knowledge base article 
  
  https://access.redhat.com/articles/1320623
  
  If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
  
  
  
   One of the configured repositories failed (Docker CE Stable - x86_64),
   and yum doesn't have enough cached data to continue. At this point the only
   safe thing yum can do is fail. There are a few ways to work &quot;fix&quot; this:
  
       1. Contact the upstream for the repository and get them to fix the problem.
  
       2. Reconfigure the baseurl/etc. for the repository, to point to a working
          upstream. This is most often useful if you are using a newer
          distribution release than is supported by the repository (and the
          packages for the previous distribution release still work).
  
       3. Run the command with the repository temporarily disabled
              yum --disablerepo=docker-ce-stable ...
  
       4. Disable the repository permanently, so yum won't use it by default. Yum
          will then just ignore the repository until you permanently enable it
          again or use --enablerepo for temporary usage:
  
              yum-config-manager --disable docker-ce-stable
          or
              subscription-manager repos --disable=docker-ce-stable
  
       5. Configure the failing repository to be skipped, if it is unavailable.
          Note that yum will try to contact the repo. when it runs most commands,
          so will have to try and fail each time (and thus. yum will be be much
          slower). If it is a very temporary problem though, this is often a nice
          compromise:
  
              yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true
  
  failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
  https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
  
  </code></pre>
  <p>Here's the output of my <code>cat /etc/os-release</code> command</p>
  <pre><code>NAME=&quot;Red Hat Enterprise Linux Server&quot;
  VERSION=&quot;7.9 (Maipo)&quot;
  ID=&quot;rhel&quot;
  ID_LIKE=&quot;fedora&quot;
  VARIANT=&quot;Server&quot;
  VARIANT_ID=&quot;server&quot;
  VERSION_ID=&quot;7.9&quot;
  PRETTY_NAME=&quot;Red Hat Enterprise Linux Server 7.9 (Maipo)&quot;
  ANSI_COLOR=&quot;0;31&quot;
  CPE_NAME=&quot;cpe:/o:redhat:enterprise_linux:7.9:GA:server&quot;
  HOME_URL=&quot;https://www.redhat.com/&quot;
  BUG_REPORT_URL=&quot;https://bugzilla.redhat.com/&quot;
  </code></pre>
  <p>Any help would be greatly appreciated. It seems nearly impossible to install docker at this point.</p>