title: Which Python variant to use as a base image in dockerfiles?
body: <p>I am using Python_onbuild as a base image in the dockerfile as below. However, it is causing my commands to be repeated by invalidating the cache whenever I make a change in the source file. </p>
  
  <pre><code>FROM python:2.7.13-onbuild
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  
  RUN echo "Test Cache"
  ARG DEBIAN_FRONTEND=noninteractive
  RUN apt-get update &amp;&amp; apt-get install --assume-yes apt-utils
  RUN apt-get update &amp;&amp; apt-get install -y curl
  RUN apt-get update &amp;&amp; apt-get install -y unzip
  RUN curl -o - url
  </code></pre>
  
  <p>Build logs:</p>
  
  <pre><code>Sending build context to Docker daemon  239.1kB
  Step 1/6 : FROM python:2.7.13-onbuild
  # Executing 3 build triggers...
  Step 1/1 : COPY requirements.txt /usr/src/app/
   ---&gt; Using cache
  Step 1/1 : RUN pip install --no-cache-dir -r requirements.txt
   ---&gt; Using cache
  Step 1/1 : COPY . /usr/src/app
   ---&gt; 13e927036649
  </code></pre>
  
  <p>This 3rd step of copying <code>(Step 1/1 : COPY . /usr/src/app)</code> is making the rest of the commands repeated whenever I make a change in any files in the working directory. I think this an ONBUILD command from the base image. If that true then what is the alternative base image in such situation? Should I use Python:?</p>
  
  <p>I want more control on the requirement installation as as well as the copying process because I have to download a 3.6GB file which I do not want to repeat every time I build the docker. </p>
  
  <p>Note: This specific base image was chose by someone else and I am building on top of some existing work.</p>