# 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"]