1

While building my Docker images (Python3.8) one common thing that I'm struggling is with solving conflicts between dependencies.

The requirements.txt file that index the install inside the container, respect any logic with the order of the index of every library install?

The output image will be the same if I sort my requirements.txt index in a different way?

mxmrpn
  • 63
  • 8
  • What exactly is your question? "Will the container be binary identical if I re-order requirements.txt?" Or just "Will the same packages be installed?" – Sören Apr 30 '22 at 21:24
  • 1
    `pip` doesn't care about the sorting of libs in a _requirements.txt_, see https://stackoverflow.com/questions/5394356/how-to-specify-install-order-for-python-pip. What I tend to do is to have two of them: one `requirements-build.txt` and another `requirements.txt` and run the first one before the later. – β.εηοιτ.βε Apr 30 '22 at 21:28
  • @ β.εηοιτ.βε that interesting, I will definitely try it. @Sören my question was more about if I will get the same versions/conflicts if I alter the order. – mxmrpn May 03 '22 at 14:47

0 Answers0