title: Install specific version of apt package for specific ubuntu version
body: <p>I want to install package <code>foo</code> version <code>1234</code> in a docker container. I prefer this to the latest version, as it will always work the same way.</p>
  
  <p>So my Dockerfile has this:</p>
  
  <pre><code>RUN apt-get update &amp;&amp; apt-get install -y foo=1234
  </code></pre>
  
  <p>But the base image is <a href="https://github.com/docker-library/mongo/blob/0d81416797611e471ec456ec99306c987a224418/4.0/Dockerfile#L1" rel="nofollow noreferrer"><code>mongodb:4.0.2</code></a>, which is layered on Ubuntu xenial.</p>
  
  <p>When I build the image, the apt install fails because it cannot find that version. I think xenial doesn't support that version.</p>
  
  <p>So how do I find the latest supported version of a package <code>foo</code> on xenial? If I run <code>apt policy foo</code> it shows me the latest for the ubuntu I'm using (bionic), not for xenial.</p>