[Distutils] Docker, development, buildout, virtualenv, local/global install

Reinout van Rees reinout at vanrees.org
Wed Jun 15 05:07:21 EDT 2016


Hi,

Buzzword bingo in the subject...

Situation: I'm experimenting with docker, mostly in combination with 
buildout. But it also applies to pip/virtualenv.

I build a docker container with a Dockerfile: install some .deb 
packages, add the current directory as /code/, run buildout (or pip), 
ready. Works fine.

Now local development: it is normal to mount the current directory as 
/code/, so that now is overlayed over the originally-added-to-the-docker 
/code/.



This means that anything done inside /code/ is effectively discarded in 
development. So a "bin/buildout" run has to be done again, because the 
bin/, parts/, eggs/ etc directories are gone.

Same problem with a virtualenv. *Not* though when you run pip directly 
and let it install packages globally! Those are installed outside of 
/code in /usr/local/somewhere.



A comment and a question:

- Comment: "everybody" uses virtualenv, but be aware that it is 
apparently normal *not* to use virtualenv when building dockers.

- Question: buildout, like virtualenv+pip, installs everything in the 
current directory. Would an option to install it globally instead make 
sense? I don't know if it is possible.




Reinout

-- 
Reinout van Rees                          http://reinout.vanrees.org/
reinout at vanrees.org                   http://www.nelen-schuurmans.nl/
"Learning history by destroying artifacts is a time-honored atrocity"



More information about the Distutils-SIG mailing list