This project provides you with a docker container which can be used to run python code. It includes building it with any required libraries installed via pip.
This project is built with:
- The latest python version
- Any additional packages you require, please modify the requirements.txt file to adjust what is included
And is packaged as a Docker container.
This image is now available on Docker Hub, so to use it simply reference the image cstosgale/python-docker
. Please note this is not currently regularly updated!
To build manually:
docker build -t cstosgale/python-docker .
Simply open port 8000 when running as a container:
docker run -p 8000:8000 --name python-docker cstosgale/python-docker
When the app runs, it will attempt to run /bin/app.py, this is your python file. Be sure to redirect this to your file outside the container in order for it to run your code.