How can I install require.txt from docker-compose?

I created an attached django application using docker-compose (after this tutorial). Now I want to add some packages to the .txt requirements file and install them. What is the right way to do this?

+4
source share
2 answers

From the textbook you are pointing to - statement

ADD requirements.txt /code/copies a requirements.txtfile from your current directory on the host to the directory /code/inside the container. When the command is executed docker-compose run, it first creates a container into which it loads the file "requirements.txt" into it.

, , , compose. requirements.txt.

+3

. requirements.txt

pip install -r requirements.txt

, . txt

, .

0

All Articles