dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM python:3.10-slim-bookworm
  2. # if you located in China, you can use aliyun mirror to speed up
  3. # && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list
  4. RUN echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
  5. && apt-get update \
  6. && apt-get install -y --no-install-recommends \
  7. pkg-config \
  8. libseccomp-dev \
  9. wget \
  10. curl \
  11. xz-utils \
  12. zlib1g \
  13. expat \
  14. perl \
  15. libsqlite3-0 \
  16. && apt-get clean \
  17. && rm -rf /var/lib/apt/lists/*
  18. # copy main binary to /main
  19. COPY main /main
  20. # copy initial env
  21. COPY env /env
  22. # copy config file
  23. COPY conf/config.yaml /conf/config.yaml
  24. # copy python dependencies
  25. COPY dependencies/python-requirements.txt /dependencies/python-requirements.txt
  26. RUN chmod +x /main /env \
  27. && pip3 install --no-cache-dir httpx==0.27.2 requests==2.32.3 jinja2==3.0.3 PySocks httpx[socks] \
  28. && 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 \
  29. && tar -xvf /opt/node-v20.11.1-linux-x64.tar.xz -C /opt \
  30. && ln -s /opt/node-v20.11.1-linux-x64/bin/node /usr/local/bin/node \
  31. && rm -f /opt/node-v20.11.1-linux-x64.tar.xz \
  32. && /env \
  33. && rm -f /env
  34. ENTRYPOINT ["/main"]