FROM alpine:edge

MAINTAINER <<org-email>>
# Built <creation-date>

# Update Alpine environment
RUN echo '@edge http://nl.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories
RUN echo '@community http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
RUN echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk update
RUN apk upgrade
RUN apk add ca-certificates

# Install Python & Pip
RUN apk add curl
RUN apk add python3
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3

# Install C Compiler Dependencies
RUN apk add gcc
RUN apk add g++
RUN apk add libffi-dev
RUN apk add python3-dev
RUN apk add musl-dev
RUN apk add make

# Install Flask Modules
RUN pip3 install flask
RUN pip3 install cffi
RUN pip3 install gevent
RUN pip3 install gunicorn
RUN pip3 install flask-cors
RUN pip3 install labpack

## Install Google Cloud Dependencies
#RUN pip3 install google-api-python-client
#RUN pip3 install google-cloud-datastore
#RUN pip3 install google-cloud-firestore
#RUN pip3 install protobuf==3.11.3

## Install Database Dependencies
#RUN pip3 install SQLAlchemy
#RUN apk add postgresql-dev
#RUN pip3 install psycopg2

## Install Scheduler & Socket Support
#RUN pip3 install apscheduler
#RUN pip3 install Flask-APScheduler
#RUN pip3 install gevent-websocket
#RUN pip3 install python-socketio
#RUN pip3 install paho-mqtt

# Clean APK cache
RUN rm -rf /var/cache/apk/*