File size: 1,516 Bytes
62bbc75 be54841 62bbc75 be54841 62bbc75 fd411ac 62bbc75 fd411ac 6b1bbbe fd411ac 62bbc75 5583aea 62bbc75 21b41d8 62bbc75 fd411ac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # build: docker buildx build --platform linux/amd64 -f Dockerfile -t wzdnzd/aggregator:tag --build-arg PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple" .
FROM python:3.12.3-slim
LABEL maintainer="wzdnzd"
# github personal access token
ENV GIST_PAT="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"
# github gist info, format: username/gist_id
ENV GIST_LINK="picxbed/f1cf50cf00bd892b80dd8af70a3cd585"
# customize airport listing url address
ENV CUSTOMIZE_LINK=""
# pip default index url
ARG PIP_INDEX_URL="https://pypi.org/simple"
# install git
RUN apt-get update && apt-get install -y git && apt-get clean
WORKDIR /
# clone the repository
RUN git clone https://github.com/wzdnzd/aggregator.git /gpe
WORKDIR /aggregator
# copy files, only linux related files are needed
RUN cp /gpe/requirements.txt /aggregator
RUN cp -r /gpe/subscribe /aggregator/subscribe
RUN cp /gpe/clash/clash-linux-amd /aggregator/clash
RUN cp /gpe/clash/Country.mmdb /aggregator/clash
RUN cp -r /gpe/subconverter /aggregator/subconverter
RUN rm -rf subconverter/subconverter-darwin-amd \
&& rm -rf subconverter/subconverter-darwin-arm \
&& rm -rf subconverter/subconverter-linux-arm \
&& rm -rf subconverter/subconverter-windows.exe
# Change permissions
RUN chmod -R 777 /aggregator
# install dependencies
RUN pip install -i ${PIP_INDEX_URL} --no-cache-dir -r requirements.txt
# expose port 8501 (python)
EXPOSE 8501
# start and run
CMD ["python", "-u", "subscribe/collect.py", "--all", "--overwrite", "--skip"]
|