When do Docker images have to be rebuilt

When do Docker images have to be rebuilt

Q. If I have a custom Docker image do I have to rebuild it if a dependent image is updated?

A. Yes. A container has very strong identifiers with its dependent images through use of a file hash. If a dependent image is updated it will have a new hash and any images that depend upon the updated container will have to be rebuilt. It is possible if you upload images to Docker Hub along with their Dockerfile to specify an autobuild trigger so that the image will automatically be rebuilt should a dependent image be updated. Note also you can specify a particular version of image to build upon in which case your image would continue to function but if you leverage the latest then you would require a rebuild.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish