From 750b7f79e4fbd2ff23d30dd17a6fce96a96fb435 Mon Sep 17 00:00:00 2001 From: xianhu Date: Mon, 21 Aug 2017 17:43:05 +0800 Subject: [PATCH] update docker --- Dockerfile => Docker/Dockerfile | 10 ++++++++-- Docker/nginx.repo | 5 +++++ Dockerfile_requirements.txt => Docker/requirements.txt | 0 3 files changed, 13 insertions(+), 2 deletions(-) rename Dockerfile => Docker/Dockerfile (88%) create mode 100644 Docker/nginx.repo rename Dockerfile_requirements.txt => Docker/requirements.txt (100%) 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