A base docker image for building python webservices that perform data analysis.
The image is based on official python:3.6-slim image, with the following additions:
This image should not be used as a standalone container, but rather as a base image for your own applications/containers. The image is bundled with an example flask application stored in /srv/app/ directory. The application is booted by gunicorn HTTP server, with configuration stored at /srv/gunicorn_cfg.py.
To use image, simply base your Dockerfile on it with:
FROM mastropinguino/python-data-ws:3.6
copy the application into /srv/app/ folder:
COPY . /srv/app/
and launch pip install if more packages are needed:
RUN cd /srv/app/ && pip install -r requirements.txt
Build and run the container
$ docker build -t awesome-app-image:latest .
$ docker run -d -p 80:8000 awesome-app-image:latest
A complete skeleton of app could be found in example folder
Contributions are always welcome! Feel free to let me know your thoughts or improvements.