working on dockerfile
This commit is contained in:
parent
579154fec3
commit
c427545b6c
21
Dockerfile
21
Dockerfile
|
@ -1,15 +1,24 @@
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
|
|
||||||
# Install Python Setuptools
|
|
||||||
RUN apt-get update
|
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 python-dev
|
||||||
RUN apt-get install -y build-essential g++ git cmake zlib1g-dev libbz2-dev
|
RUN apt-get install -y build-essential g++ git cmake zlib1g-dev libbz2-dev
|
||||||
RUN apt-get install -y libmysqlclient-dev
|
RUN apt-get install -y libmysqlclient-dev
|
||||||
|
|
||||||
|
# Install Python Setuptools
|
||||||
|
RUN apt-get install -y python-setuptools
|
||||||
|
|
||||||
# Install pip
|
# Install pip
|
||||||
RUN easy_install pip
|
RUN easy_install pip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt-get -y install mysql-server
|
||||||
|
|
||||||
|
|
||||||
# Add and install Python modules
|
# Add and install Python modules
|
||||||
ADD requirements.txt /roadmap/requirements.txt
|
ADD requirements.txt /roadmap/requirements.txt
|
||||||
RUN cd /roadmap; pip install -r requirements.txt
|
RUN cd /roadmap; pip install -r requirements.txt
|
||||||
|
@ -19,6 +28,14 @@ ADD . /roadmap
|
||||||
|
|
||||||
# Expose
|
# Expose
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
EXPOSE 3306
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
|
CMD ["/usr/bin/mysqld_safe"]
|
||||||
CMD ["python", "/roadmap/manage.py", "test"]
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user