Files
Debain-repos/AiO_Container/Dockerfile

58 lines
1.7 KiB
Docker
Raw Normal View History

FROM alpine:latest
# https://docs.docker.com/reference/dockerfile/#environment-replacement
2026-01-25 00:04:00 +01:00
# ENV DEBMIRRORURL="https://www.debian.org/mirror/list"
# By default these are scraped
2026-01-25 00:04:00 +01:00
ENV EXTRA_REPOS=True
ENV PROXMOX_REPOS=True
ENV DOCKER_REPOS=True
ENV DEBIAN_REPOS=True
ENV OPNSENSE_REPOS=True
RUN apk update && \
apk add python3 py3-pip git su-exec curl wget unzip && \
mkdir -p /etc/debmirror
WORKDIR /etc/debmirror/
# This will be done in Init script based on what ENV's are configured
# RUN git clone https://tea.shupogaki.org/YuruC3/Repo-IP-lists && \
# ln -s /etc/debmirror/Repo-IP-lists/MirrorListV4 /etc/debmirror/MirrorListV4 && \
# ln -s /etc/debmirror/Repo-IP-lists/MirrorListV6 /etc/debmirror/MirrorListV6 && \
# ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV4 /etc/debmirror/OPNS_MirrorListV4 && \
# ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV6 /etc/debmirror/OPNS_MirrorListV6
# RUN touch /etc/debmirror/MirrorListV6 && \
# touch /etc/debmirror/MirrorListV4
# Copy code
2026-01-25 00:04:00 +01:00
COPY ./code/main.py /etc/debmirror/
COPY ./code/whatDomain.py /etc/debmirror/
2026-01-25 00:43:35 +01:00
2026-01-25 00:04:00 +01:00
COPY ./entrypoint.sh /
2026-01-25 00:43:35 +01:00
RUN chmod +x /entrypoint.sh
# Copy important files
# COPY ./init.sh /etc/debmirror/
# Install python modules
COPY ./requirements.txt /etc/debmirror/
RUN python3 -m venv venv && \
venv/bin/python3 -m pip install --upgrade pip && \
venv/bin/pip3 install -r requirements.txt
# Setup cronjobs
# COPY cron-jobs /etc/crontabs/
# RUN chmod 0644 /etc/crontabs/cron-jobs && \
# crontab /etc/crontabs/cron-jobs
# Copy and configure git copying script
COPY ./gitPush.sh /etc/debmirror/
RUN chmod +x /etc/debmirror/gitPush.sh
ENTRYPOINT [ "/entrypoint.sh" ]
# Start cron
CMD ["/usr/sbin/crond", "-f"]