12345678910111213141516171819202122232425262728293031323334353637383940 |
- FROM python:3.10-slim-bookworm
- # if you located in China, you can use aliyun mirror to speed up
- # && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list
- RUN echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- pkg-config \
- libseccomp-dev \
- wget \
- curl \
- xz-utils \
- zlib1g \
- expat \
- perl \
- libsqlite3-0 \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
- # copy main binary to /main
- COPY main /main
- # copy initial env
- COPY env /env
- # copy config file
- COPY conf/config.yaml /conf/config.yaml
- # copy python dependencies
- COPY dependencies/python-requirements.txt /dependencies/python-requirements.txt
- RUN chmod +x /main /env \
- && pip3 install --no-cache-dir httpx==0.27.2 requests==2.32.3 jinja2==3.0.3 PySocks httpx[socks] \
- && wget -O /opt/node-v20.11.1-linux-x64.tar.xz https://npmmirror.com/mirrors/node/v20.11.1/node-v20.11.1-linux-x64.tar.xz \
- && tar -xvf /opt/node-v20.11.1-linux-x64.tar.xz -C /opt \
- && ln -s /opt/node-v20.11.1-linux-x64/bin/node /usr/local/bin/node \
- && rm -f /opt/node-v20.11.1-linux-x64.tar.xz \
- && /env \
- && rm -f /env
- ENTRYPOINT ["/main"]
|