Is there any good reason to configure virtualenv for python in Docker containers?

Almost all python tutorials offer to install virutalenv as a first step to maintain consistency. When working with Docker containers, why or why not support this standard?

+4
source share
2 answers

If you intend to run only one version in the container, and this is the version of the container, there is no technical reason to use virtualenv in the container. But there may still be non-technical reasons. For example, if your command is used to search python libraries in ~ / some-env or better understand the virtualenv structure than lib containers, then you can continue to use virtualenv anyway.

On the cons side, virtualenv on top of the existing system python can also make your images a bit large.

+4
source

. - , -. , ( python). virtualenv.

0

Source: https://habr.com/ru/post/1619512/


All Articles