Skip to content

Instantly share code, notes, and snippets.

@renfredxh
Last active August 29, 2015 14:04
Show Gist options
  • Save renfredxh/c2c8081916377466404f to your computer and use it in GitHub Desktop.
Save renfredxh/c2c8081916377466404f to your computer and use it in GitHub Desktop.
SRCTweb Dockerfile
############################################################
# Dockerfile to build SRCTweb flask application
# Based on Ubuntu
############################################################
# Instructions:
#
# Build: sudo docker build -t srctweb .
# Run: sudo docker run -p 8000:80 -i -t -d srctweb
#
# You'll need to reverse proxy port 8000 via nginx
# Set the base image to Ubuntu
FROM ubuntu
# File Author / Maintainer
MAINTAINER Studnt-Run Computing and Technology - GMU
# Add the application resources URL
#RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" >> /etc/apt/sources.list
# Update the sources list
RUN apt-get update
# Install basic applications
RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential
# Install Python and Basic Python Tools
RUN apt-get install -y python python-dev python-distribute python-pip
# Clone down SRCT-Web
RUN git clone https://github.com/srct/srctweb.git srctweb
# Get pip to download and install requirements:
RUN pip install -r /srctweb/requirements.txt
# Expose ports
EXPOSE 80
# Set the default directory where CMD will execute
WORKDIR /srctweb/srctweb
# Use Gunicorn to serve the application
CMD gunicorn srctweb:website -b 0.0.0.0:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment