Open suyin-long opened 3 years ago
python3 -m pip install --upgrade pip
FROM centos:8
MAINTAINER ResolveWang resolvewang@foxmail.com
ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 RUN yum install squid -yq RUN sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf RUN cp /etc/squid/squid.conf /etc/squid/squid.conf.backup RUN yum install python3 python3-pip -yq RUN python3 -m pip install --upgrade pip RUN which python3|xargs -i ln -s {} /usr/bin/python RUN which pip3|xargs -i ln -s {} /usr/bin/pip COPY . /haipproxy WORKDIR /haipproxy RUN pip install -i https://pypi.douban.com/simple/ -r requirements.txt CMD ['python', 'crawler_booter.py', '--usage', 'crawler', 'common']
python3 -m pip install --upgrade pip
修改后的文件如下:MAINTAINER ResolveWang resolvewang@foxmail.com
ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 RUN yum install squid -yq RUN sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf RUN cp /etc/squid/squid.conf /etc/squid/squid.conf.backup RUN yum install python3 python3-pip -yq RUN python3 -m pip install --upgrade pip RUN which python3|xargs -i ln -s {} /usr/bin/python RUN which pip3|xargs -i ln -s {} /usr/bin/pip COPY . /haipproxy WORKDIR /haipproxy RUN pip install -i https://pypi.douban.com/simple/ -r requirements.txt CMD ['python', 'crawler_booter.py', '--usage', 'crawler', 'common']