Last active
August 29, 2015 14:19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
# Install the prerequisites | |
run apt-get update | |
run apt-get install -yqq \ | |
software-properties-common \ | |
bzip2 \ | |
curl \ | |
phantomjs | |
# Install Oracle Java8 | |
run add-apt-repository -y ppa:webupd8team/java | |
run apt-get update | |
run echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
run apt-get install -y oracle-java8-installer | |
# Install the building tools | |
run apt-get install -yqq \ | |
git \ | |
git-core \ | |
build-essential \ | |
vim | |
# Install Maven | |
RUN curl -s http://apache.crihan.fr/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz | tar xzf - | |
# Exporting MAVEN_HOME | |
ENV MAVEN_HOME /apache-maven-3.1.1 | |
ENV PATH $PATH:$MAVEN_HOME/bin | |
RUN apt-get install -yqq \ | |
python python-dev \ | |
python-pip \ | |
python-psycopg2 \ | |
thrift-compiler | |
# Clone datahub repository | |
RUN git clone https://github.com/alessandroleite/datahub.git | |
# Export DATAHUB_HOME | |
ENV DATAHUB_HOME /datahub | |
# Create user_data directory | |
RUN mkdir /user_data | |
# Install dependencies with pip | |
RUN pip install -r $DATAHUB_HOME/requirements.txt | |
RUN abspath=$(cd "$(dirname "$BASH_SOURCE")"; pwd) | |
ENV abspath $DATAHUB_HOME/src | |
RUN rm -rf $DATAHUB_HOME/src/gen-py | |
RUN thrift --gen py -o $abspath $abspath/thrift/datahub.thrift | |
RUN thrift --gen py -o $abspath $abspath/thrift/account.thrift | |
ENV PYTHONPATH $abspath:$abspath/gen-py:$abspath/apps | |
EXPOSE 8000 | |
# Start Datahub listening on port 8000 and binded to all interfaces | |
CMD ["python", "/datahub/src/manage.py", "runserver", "0.0.0.0:8000"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment