Skip to content

Instantly share code, notes, and snippets.

@russau
Created September 27, 2015 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russau/45b379d12cf594d52da1 to your computer and use it in GitHub Desktop.
Save russau/45b379d12cf594d52da1 to your computer and use it in GitHub Desktop.
Dockerfile for miguelgrinberg/Flask-SocketIO example
# Setup miguelgrinberg/Flask-SocketIO example
FROM ubuntu:12.04
MAINTAINER russ <russell.sayers@gmail.com>
RUN apt-get update
RUN apt-get install -y git python-pip gcc python-dev wget
RUN pip install --upgrade pip
# Setup Flask-SocketIO application
RUN git clone https://github.com/miguelgrinberg/Flask-SocketIO.git
RUN /usr/local/bin/pip install -r /Flask-SocketIO/example/requirements.txt
# Patch app.py to expose to the public
RUN wget https://gist.githubusercontent.com/russau/5aef63cb1673b5f8a1c7/raw/524ac4a3b6e4a3508ac08ebf4606f1d29de2578c/0001-Listen-on-the-public-network-interface.patch
RUN git apply --directory=Flask-SocketIO 0001-Listen-on-the-public-network-interface.patch
# Start processes
EXPOSE 5000
CMD ["python", "Flask-SocketIO/example/app.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment