-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Dockerfile
36 lines (25 loc) · 1.08 KB
/
Dockerfile
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
# 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=""
# github gist info, format: username/gist_id
ENV GIST_LINK=""
# customize airport listing url address
ENV CUSTOMIZE_LINK=""
# pip default index url
ARG PIP_INDEX_URL="https://pypi.org/simple"
WORKDIR /aggregator
# copy files, only linux related files are needed
COPY requirements.txt /aggregator
COPY subscribe /aggregator/subscribe
COPY clash/clash-linux-amd clash/Country.mmdb /aggregator/clash
COPY 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
# install dependencies
RUN pip install -i ${PIP_INDEX_URL} --no-cache-dir -r requirements.txt
# start and run
CMD ["python", "-u", "subscribe/collect.py", "--all", "--overwrite", "--skip"]