38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM alpine:latest
 | |
| 
 | |
| # https://docs.docker.com/reference/dockerfile/#environment-replacement
 | |
| ENV DEBMIRRORURL="https://www.debian.org/mirror/list"
 | |
| ENV EXTRAREPOS=True
 | |
| ENV SECURITYREPOS=True
 | |
| 
 | |
| RUN apk update && \
 | |
|     apk add python3 py3-pip git  
 | |
| # inotify-tools
 | |
| 
 | |
| RUN mkdir /etc/debmirror
 | |
| WORKDIR /etc/debmirror/
 | |
| 
 | |
| RUN git clone https://tea.shupogaki.org/YuruC3/Debain-repos && \
 | |
|     ln -s /etc/debmirror/Debain-repos/MirrorListV4 /etc/debmirror/MirrorListV4 && \
 | |
|     ln -s /etc/debmirror/Debain-repos/MirrorListV6 /etc/debmirror/MirrorListV6
 | |
| # RUN touch /etc/debmirror/MirrorListV6 && \
 | |
| #     touch /etc/debmirror/MirrorListV4
 | |
| 
 | |
| COPY mainDocker.py /etc/debmirror/
 | |
| COPY whatDomain.py /etc/debmirror/
 | |
| 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
 | |
| 
 | |
| COPY cron-jobs /etc/crontabs/
 | |
| RUN chmod 0644 /etc/crontabs/cron-jobs && \
 | |
|     crontab /etc/crontabs/cron-jobs
 | |
| 
 | |
| COPY gitPush.sh /etc/debmirror/
 | |
| 
 | |
| RUN chmod +x /etc/debmirror/gitPush.sh
 | |
| 
 | |
| CMD ["/usr/sbin/crond", "-f"]
 | 
