mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
添加各个节点的镜像制作
This commit is contained in:
24
examples/worker/python/Dockerfile
Normal file
24
examples/worker/python/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 添加依赖描述文件
|
||||
ADD requirements.txt /opt/crawlab/
|
||||
# 添加二进制包
|
||||
ADD crawlab /usr/local/bin/
|
||||
|
||||
RUN chmod +x /usr/local/bin/crawlab
|
||||
|
||||
# 安装基本环境
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y curl git net-tools iputils-ping ntp python3 python3-pip \
|
||||
&& apt-get clean \
|
||||
&& ln -s /usr/bin/pip3 /usr/local/bin/pip \
|
||||
&& ln -s /usr/bin/python3 /usr/local/bin/python
|
||||
|
||||
# 安装依赖
|
||||
RUN pip install -r /opt/crawlab/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
WORKDIR /opt/crawlab
|
||||
|
||||
ENTRYPOINT ["crawlab"]
|
||||
Reference in New Issue
Block a user