diff --git a/Dockerfile b/Dockerfile index 2f9290f..85a9c6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,24 @@ FROM ubuntu -# Install Python Setuptools RUN apt-get update -RUN apt-get install -y python-setuptools +RUN apt-get upgrade -y + +# Requirements RUN apt-get install -y python-dev RUN apt-get install -y build-essential g++ git cmake zlib1g-dev libbz2-dev RUN apt-get install -y libmysqlclient-dev +# Install Python Setuptools +RUN apt-get install -y python-setuptools + # Install pip RUN easy_install pip + + +RUN apt-get -y install mysql-server + + # Add and install Python modules ADD requirements.txt /roadmap/requirements.txt RUN cd /roadmap; pip install -r requirements.txt @@ -19,6 +28,14 @@ ADD . /roadmap # Expose EXPOSE 8000 +EXPOSE 3306 # Run +CMD ["/usr/bin/mysqld_safe"] CMD ["python", "/roadmap/manage.py", "test"] + + + + +# http://txt.fliglio.com/2013/11/creating-a-mysql-docker-container/ +# http://blogs.aws.amazon.com/application-management/post/Tx1ZLAHMVBEDCOC/Dockerizing-a-Python-Web-App