repo-updater/Dockerfile
2024-09-19 22:36:34 +08:00

20 lines
823 B
Docker

FROM archlinux:latest
ARG MIRROR="https://mirrors.tuna.tsinghua.edu.cn"
RUN echo Server = $MIRROR/archlinux/\$repo/os/\$arch > /etc/pacman.d/mirrorlist
RUN pacman-key --init
RUN pacman-key --populate
RUN pacman --noconfirm -Syu \
python python-pip python-setuptools \
python-pycryptodome python-pycryptodomex \
python-requests python-idna python-urllib3 \
python-xmltodict python-crcmod python-six pyalpm \
python-charset-normalizer python-certifi python-pgpy
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --break-system-packages cos-python-sdk-v5 tencentcloud-sdk-python
RUN mkdir /workspace /updater
COPY config.json repo.py upload.html /updater/
COPY keyring.gpg signer.key /updater/
WORKDIR /updater
EXPOSE 8888/tcp
CMD ["python3", "/updater/repo.py"]