title: How to install older Docker version (18.06.2) on Ubuntu 18?
body: <p>I've been trying for days to install Kubernetes, but it starts already at Docker. I can't seem to find the right version for Docker on Ubuntu. 
  As Kubernetes recommends version 18.06.2 of Docker I followed the steps on Kubernetes at first: <a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/" rel="nofollow noreferrer">Kubernetes installation</a></p>
  
  <p>Where as I get this error: </p>
  
  <pre><code>E: Version '18.06.2~ce~3-0~ubuntu' for 'docker-ce' was not found
  </code></pre>
  
  <p>Docker says to list the versions available versions by this command:</p>
  
  <pre><code>apt-cache madison docker-ce
  </code></pre>
  
  <p>Which gets me this:</p>
  
  <pre><code>root@vmi257369:~# apt-cache madison docker-ce
   docker-ce | 5:19.03.3~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
   docker-ce | 5:19.03.2~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
   docker-ce | 5:19.03.1~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
   docker-ce | 5:19.03.0~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
  </code></pre>
  
  <p>As you can see no 18.06, but only 19 which isn't recommended by Kubernetes. </p>
  
  <p>I've followed this guide of Docker <a href="https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce-1" rel="nofollow noreferrer">Docker installation</a>, but I can't seem to find the right GPG or what ever is necessary for Docker version 18. </p>
  
  <p>Of course I've tried the post on Stackoverflow as well <a href="https://stackoverflow.com/questions/54471543/e-version-18-06-1ce3-0ubuntu-for-docker-ce-cli-was-not-found">see here</a>, the result was:</p>
  
  <pre><code>root@vmi257369:~# export VERSION=18.06.1-ce &amp;&amp; curl -sSL get.docker.com | sh
  # Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
  Warning: the "docker" command appears to already exist on this system.
  
  If you already have Docker installed, this script can cause trouble, which is
  why we're displaying this warning and provide the opportunity to cancel the
  installation.
  
  If you installed the current Docker package using this script and are using it
  again to update Docker, you can safely ignore this message.
  
  You may press Ctrl+C now to abort this script.
  + sleep 20
  + sh -c apt-get update -qq &gt;/dev/null
  + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl &gt;/dev/null
  + sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - &gt;/dev/null
  Warning: apt-key output should not be parsed (stdout is not a terminal)
  + sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" &gt; /etc/apt/sources.list.d/docker.list
  + sh -c apt-get update -qq &gt;/dev/null
  INFO: Searching repository for VERSION '18.06.1-ce'
  INFO: apt-cache madison 'docker-ce' | grep '18.06.1.*ce.*-0~ubuntu' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
  
  ERROR: '18.06.1-ce' not found amongst apt-cache madison results
  </code></pre>
  
  <p>Who knows what to do? </p>
  
  <p><strong>On answer</strong>
  By this command</p>
  
  <pre><code>apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main"
  </code></pre>
  
  <p>I get this error:
  Failed to fetch &lt;> 403 Forbidden on IP .... 
  It's on a Contabo server maybe that's the reason?</p>