roadmap/Dockerfile

42 lines
826 B
Docker
Raw Normal View History

2015-03-12 02:22:38 +00:00
FROM ubuntu
RUN apt-get update
2015-03-12 02:42:19 +00:00
RUN apt-get upgrade -y
# Requirements
2015-03-12 02:22:38 +00:00
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
2015-03-12 02:42:19 +00:00
# Install Python Setuptools
RUN apt-get install -y python-setuptools
2015-03-12 02:22:38 +00:00
# Install pip
RUN easy_install pip
2015-03-12 02:42:19 +00:00
RUN apt-get -y install mysql-server
2015-03-12 02:22:38 +00:00
# Add and install Python modules
ADD requirements.txt /roadmap/requirements.txt
RUN cd /roadmap; pip install -r requirements.txt
# Bundle app source
ADD . /roadmap
# Expose
EXPOSE 8000
2015-03-12 02:42:19 +00:00
EXPOSE 3306
2015-03-12 02:22:38 +00:00
# Run
2015-03-12 02:42:19 +00:00
CMD ["/usr/bin/mysqld_safe"]
2015-03-12 02:22:38 +00:00
CMD ["python", "/roadmap/manage.py", "test"]
2015-03-12 02:42:19 +00:00
# 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