Closed chawyehsu closed 6 years ago
感谢反馈,可能原因是windows和类Unix平台的路径表示有些不一致
这个Dockerfile里面我看见已经COPY当前目录到容器的/haipproxy了
PS F:\github\haipproxy> cat .\Dockerfile
FROM vaeum/alpine-python3-pip3
MAINTAINER ResolveWang <resolvewang@foxmail.com>
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apk upgrade --no-cache \
&& apk add --no-cache \
squid \
libxml2-dev \
libxml2 \
libxslt-dev \
libxslt \
libffi-dev \
python3-dev \
&& rm -rf /var/cache/* \
&& rm -rf /root/.cache/*
#RUN apt update
#RUN apt install squid -yq
RUN sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf && cp /etc/squid/squid.conf /etc/squid/squid.conf.backup
#RUN apt install python3 python3-pip -yq
#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 pip3 install --upgrade pip && pip3 install -i https://pypi.douban.com/simple/ -r requirements.txt
#CMD ['python3', 'crawler_booter.py', '--usage', 'crawler', 'common']
所以docker-compose.yml里面就可以注释掉,关键windows上挂volumes坑太多,老是提示权限不足,还是直接copy到容器里面省事(>:__:<)
#volumes:
# - .:/haipproxy
我建议 docker-compose 改成这样吧:https://github.com/h404bi/haipproxy/commit/685932e46f158d0656c58408a46517261b01a219
修改 docker-compose.yml 注释掉如下2行后可用