liuyuqi-dellpc 8 months ago
parent
commit
ef0b10842d
2 changed files with 10 additions and 1 deletions
  1. 8 0
      Dockerfile
  2. 2 1
      README.md

+ 8 - 0
Dockerfile

@@ -9,8 +9,16 @@ ENV PYTHONDONTWRITEBYTECODE=1
 # Turns off buffering for easier container logging
 ENV PYTHONUNBUFFERED=1
 
+# RUN mkdir -p ~/.pip
+# RUN echo '\n\
+#     [global] \n\
+#     trusted-host=mirrors.aliyun.com \n\
+#     index-url=https://mirrors.aliyun.com/pypi/simple/ \n\
+#     ' > ~/.pip/pip.conf
+
 # Install pip requirements
 COPY requirements.txt .
+
 RUN python -m pip install -r requirements.txt
 RUN python -m pip install pyinstaller
 

+ 2 - 1
README.md

@@ -24,7 +24,8 @@ pyinstaller -F -c main.py
 
 docker 打包:
 ```
-docker run -it --rm -v /data/crawl_mrdx:/app jianboy/crawl_mrdx:v1.0.5
+docker build -t jianboy/crawl_mrdx:v1.0.5 .
+docker run -it --rm -v /data/crawl-mrdx:/app jianboy/crawl_mrdx:v1.0.5
 
 ```