scrapy环境搭建Dockerfile

FROM ubuntu:16.04
LABEL maintainer="[email protected]"

ENV DEBIAN_FRONTEND noninteractive

RUN echo "\033[32m---change source to mirrors.aliyun---\033[0m" \
        && sed -i 's/archive.ubuntu/mirrors.aliyun/g; s/security.ubuntu/mirrors.aliyun/g' /etc/apt/sources.list \
        && echo "\033[32m---install dependency libs---\033[0m" \
        && apt-get update \
        && apt-get install -y \
        python \
        python-pip \
        python-dev \
        libevent-dev \
        libssl-dev \
        && echo "\033[32m---change pip source to mirrors.aliyun---\033[0m" \
        && mkdir -p ~/.pip \
        && echo "[global]\nindex-url = http://mirrors.aliyun.com/pypi/simple/\n[install]\ntrusted-host=mirrors.aliyun.com\n" > ~/.pip/pip.conf \
        && echo "\033[32m---install scrapy libs---\033[0m" \
        && pip install scrapy \
        && apt-get clean

你可能感兴趣的:(scrapy环境搭建Dockerfile)