A set of files that uses docker and docker-compose to supply easy access to python versions.
- Docker installed and running
- docker-compose
requirements-all.txtA list of PyPi packages to installrequirements-2.7.txtA list of packages only installed for python 2.7 (replace 2.7 with any python version)Dockerfileinstructs docker how to build the imagesdocker-compose.ymlA list of all available python versions and how to run themenvContains bash prompt syntax ($PS1) (Currentlypython-<version>:<path>$)
To start a bash shell with a python 3.7
$ docker-compose run python37
python-3.7.0:~# To start a interactive python shell ipython shell with a python 2.7
$ docker-compose run python27
Python 2.7.15 (default, Sep 5 2018, 05:04:02)
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: Execute a python script contained in the project folder
$ docker-compose run python34 python hello.py
Hello world!