This is a simple script to install multiple versions of Python using pyenv.
docker build -t multiple-pyenv:latest .
docker run --entrypoint bash -it --rm multiple-pyenv:latest
cd /app/pyenv-1
python main.py
cd /app/pyenv-2
python main.py
cd /app/pyenv-3
python main.py
There are some good features in this template:
- Minimal installation of python versions for each pyenv
- Easy to stack another python versions
- Easy to use
There are also some limitations in this template:
- All pyenvs have to share their apt packages