(1) Docker containers are plenty of isolation themselves. In your Dockerfile, don’t bother creating a virtual environment, just pip install packages into the “global” space (on an Ubuntu base you’ll see files in `/usr/local/lib/python2.7/dist-packages’).
(2) Or, this is a fine use case for an entrypoint script:
@dmaze I actually have to use multiple virtualenvs as my project has multiple python apps with different dependencies and I shouldn’t allow them to conflict with each other.
Interestingly, I came across pipenv on a hacker news submission of mine last night, and created a nice Dockerfile that bootstraps Debian with pyenv, a custom python runtime, and pipenv for a usecase similar to mine.
@think the init file solution looks like a potential sol’n. Thanks!