title: Rebuild container after each change?
body: <p>The <a href="https://docs.docker.com/reference/builder/#onbuild">Docker documentation</a> suggests to use the <code>ONBUILD</code> instruction if you have the following scenario:</p>
  
  <blockquote>
    <p>For example, if your image is a reusable python application builder, it will require application source code to be added in a particular directory, and it might require a build script to be called after that. You can't just call ADD and RUN now, because you don't yet have access to the application source code, and it will be different for each application build. You could simply provide application developers with a boilerplate Dockerfile to copy-paste into their application, but that is inefficient, error-prone and difficult to update because it mixes with application-specific code.</p>
  </blockquote>
  
  <p>Basically, this all sounds nice and good, but that does mean that I have to re-create the app container every single time I change something, even if it's only a typo.</p>
  
  <p>This doesn't seem to be very efficient, e.g. when creating web applications where you are used to change something, save, and hit refresh in the browser.</p>
  
  <p>How do you deal with this?</p>