2

I have a Python package I maintain called "Juriscraper". I always want the latest version of it in my docker image. As a result, in my requirements.txt I just have the following line:

juriscraper

It doesn't say the version number, it's not version locked, etc. That's how the requirements.txt file should be in this instance.

Buuuut, if I release a new version of Juriscraper, and then try to rebuild my docker image to get the latest version, I can't because the requirements.txt file hasn't changed, and so is cached.

The one solution I've found is to use --no-cache in the docker build, but that busts my entire cache and takes a while to rebuild (it's a complicated image).

Is there a better solution here? I guess I could also just put a comment into the requirements.txt file that I changed all the time, but that's not great either.

mlissner
  • 17,359
  • 18
  • 106
  • 169

0 Answers0