1、为了打包天眼查、docker容器、制作了下面的容器、
2、下面的文件有
3、Dockerfile 下面是这样写的
FROM python:3.6
#RUN apt-get update && apt-get install -y --no-install-recommends
# libsm6
# libxext6
# libxrender-dev
# git
# &&
# apt-get clean &&
# rm -rf /var/lib/apt/lists/*
WORKDIR /crawlTian6.0
COPY requirements.txt .
RUN pip install -r requirements.txt
# RUN pip install pipenv && pipenv install
# RUN git clone https://github.com/jonstewart/afflib.git && cd afflib/pyaff && python setup.py build && python setup.py install
EXPOSE 5001
CMD ["python", "/crawlTian6.0/crawl.py"]
requirements 是这样写的
lxml==4.2.3
connexion==2.0.0
requests==2.19.1
psycopg2==2.7.5
Pillow==5.3.0
fontTools==3.32.0
制作完镜像 、查看镜像
运行程序
root@jia-B85M-D3V-A:/home/jia/crawlTian6.0# docker run -v $(pwd):/crawlTian6.0 ty