Docker – pip install from requirements or copy installed modules

  docker, installation, pip, python-3.x

When creating a docker, i am currently doing pip install -r requirements.txt.

Instead of pip install, can I just copy all the already installed modules in my venv of project on local host into docker? Is it equivalent or is there a difference? I am assuming here that local host is same as docker container in terms of configuration.

Source: Docker Questions

LEAVE A COMMENT