-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提供给大家一个dockerfile,包括docker镜像 #148
Comments
无脑使用版本。 |
from alpine:3.7 RUN apk add --no-cache --upgrade apk-tools tzdata && EXPOSE 8000 #这里安装python3,各种依赖 #克隆代理池源码 #启动代理池 |
https://hub.docker.com/r/cz5424/ipproxypool/~/dockerfile/ py2版本,综合大家的各种版本汇总的 |
The above version only supports Python 2. If you looking for Python 3 support, try the experimental version.
pip install web.py==0.40-dev1
python3 可以使用0.40-dev1,直接pip安装
提供一个dockerfile,还没传上docker hub
from alpine:3.7
MAINTAINER jackadamjackadam@sina.com
#变更源
安装包源切到中科大, 国内访问加速
RUN {
echo 'http://mirrors.ustc.edu.cn/alpine/v3.7/main';
echo 'http://mirrors.ustc.edu.cn/alpine/v3.7/community';
echo 'http://mirrors.ustc.edu.cn/alpine/edge/main';
echo 'http://mirrors.ustc.edu.cn/alpine/edge/community';
echo 'http://mirrors.ustc.edu.cn/alpine/edge/testing';
} > /etc/apk/repositories && \
设置默认时区为亚洲/上海 (没有北京可选)
EXPOSE 8000
#这里增加python3
RUN apk add --no-cache --upgrade git python3 python3-dev gcc musl-dev==1.1.19-r8 libxslt-dev linux-headers &&
pip3 install --upgrade pip requests chardet sqlalchemy utils psutil lxml web.py==0.40-dev1 gevent
#克隆代理池源码
RUN git clone https://github.com/qiyeboy/IPProxyPool.git
#启动代理池
CMD python3 /IPProxyPool/IPProxy.py
配套启动脚本:
echo 停止容器
docker stop Iproxypool
echo 删除容器
docker rm Iproxypool
echo 临时禁用selinux
setenforce 0
echo 重建镜像
docker build -t ipproxypool .
echo 恢复启用selinux
setenforce 1
echo 启动容器
docker run -d -t --restart=always --privileged --name Iproxypool -p 8000:8000 ipproxypool
The text was updated successfully, but these errors were encountered: