I'm currently learning about Docker. I'm trying to use it in my python project (I'm using Django)
In my Dockerfile, I want my image to install the dependencies of my project into each new container.
I just created a requirements.txt file using the command tool 'pipreqs'
After looking at the content of this file, I realize that I have 2 others files related to the dependencies:
PipfilePipfile.lock
I think they have been created and updated when I was using pipenv command.
My question is : Which one of these file should I use in my Dockerfile? Pipfile, Pipfile.lock or requirements.txt?
Default choice is requirements.txt with pinned versions.
Versions can be pinned by
pip freeze > requirements.txtorpipenv lock -r > requirements.txt. You need Pipfile and Pipfile.lock if you going to use pipenv inside container. Thenpipenv installwill use your Pipfile.lock.