diff --git a/Dockerfile b/Docker/Dockerfile similarity index 88% rename from Dockerfile rename to Docker/Dockerfile index 6650c3a..d959c10 100644 --- a/Dockerfile +++ b/Docker/Dockerfile @@ -1,5 +1,5 @@ # Dockerfile by xianhu: build a docker image for spider or flask -# usage: docker build -t user/centos:v08 . +# usage: docker build -t user/centos:v09 . FROM centos:6.8 @@ -23,6 +23,12 @@ RUN yum install -y gcc RUN yum install -y make RUN yum install -y zlib-devel RUN yum install -y openssl-devel + +# install nginx +ADD ./nginx.repo /etc/yum.repos.d/ +RUN yum install -y nginx + +# clean yum cache RUN yum clean all # restart crontab service @@ -41,7 +47,7 @@ RUN make clean RUN make distclean # install libs of python3 -ADD ./Dockerfile_requirements.txt /root/ +ADD ./requirements.txt /root/ WORKDIR /root/ RUN pip3 install --upgrade pip RUN pip3 install -r Dockerfile_requirements.txt diff --git a/Docker/nginx.repo b/Docker/nginx.repo new file mode 100644 index 0000000..d11a88a --- /dev/null +++ b/Docker/nginx.repo @@ -0,0 +1,5 @@ +[nginx] +name=nginx repo +baseurl=http://nginx.org/packages/centos/6/$basearch/ +gpgcheck=0 +enabled=1 diff --git a/Dockerfile_requirements.txt b/Docker/requirements.txt similarity index 100% rename from Dockerfile_requirements.txt rename to Docker/requirements.txt