Skip to content

Instantly share code, notes, and snippets.

@chasballew
Created December 13, 2014 02:46
Show Gist options
  • Save chasballew/d1e793611706d6542ada to your computer and use it in GitHub Desktop.
Save chasballew/d1e793611706d6542ada to your computer and use it in GitHub Desktop.
Flask w/ requirements Dockerfile
# DOCKER-VERSION 0.4.0
from ubuntu:12.04
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
run apt-get -y update
run apt-get -y install python python-pip build-essential
run pip install flask flask-sqlalchemy
run apt-get -y purge build-essential
run apt-get -y autoremove
ADD . /opt/app
WORKDIR /opt/app
ADD requirements.txt /opt/app/
RUN pip install -r requirements.txt
EXPOSE 3000
CMD python manage.py runserver -p 3000 --threaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment