title: Pulling from a local docker image instead
body: <p>I have an app with a Dockerfile content that looks like</p>
  <h1>Dockerfile</h1>
  <pre><code>FROM SOME_NUMBERS.dkr.ecr.us-east-1.amazonaws.com/app_name:SOME_HEX_VALUE
  
  COPY docker/app/bin/startup.sh /usr/bin/
  
  CMD [&quot;/usr/bin/startup.sh&quot;]
  </code></pre>
  <p>I don't want to pull the image from amazon anymore instead I'd like to &quot;pull&quot; from the already-existing local image pulled the after the first <code>docker-compose up --build</code> command was ran.</p>
  <p>When I do <code>docker images</code> I get</p>
  <p><code>SOME_NUMBERS.dkr.ecr.us-east-1.amazonaws.com/app_name   SOME_HEX_VALUE   SOMESHORT_HEX        2 days ago          1.54 GB</code> which means the image is local already. I understand this</p>
  <blockquote>
  <p>if the host has the image you want docker-compose to use on it it will use that image but if the host doesn't have it, it will go to docker hub or whatever you have setup in your config for registries</p>
  </blockquote>
  <p>So I changed the Dockerfile content to this:</p>
  <p><code>FROM IMAGE_ID:SOME_HEX_VALUE</code> where <code>IMAGE_ID</code> is the image id of the repository I want when I do <code>docker images</code> but then I get <code>Service 'app' failed to build: repository SOMESHORT_HEX not found: does not exist or no pull access</code> and I'd like to know how to tell Docker to use the local image instead of trying to pull from the amazon url. Any ideas?</p>