41 lines
		
	
	
		
			1023 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
		
		
			
		
	
	
			41 lines
		
	
	
		
			1023 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
|  | FROM alpine:latest
 | ||
|  | 
 | ||
|  | ENV EXTRAURL "http://mdu.se/"
 | ||
|  | ENV REPOFILE "/etc/customMirrors/repoList.list"
 | ||
|  | ENV DNSSRV "1.1.1.1"
 | ||
|  | 
 | ||
|  | RUN apk update && \
 | ||
|  |     apk add python3 py3-pip git bash
 | ||
|  | # inotify-tools
 | ||
|  | 
 | ||
|  | RUN mkdir /etc/customMirrors
 | ||
|  | WORKDIR /etc/customMirrors/
 | ||
|  | 
 | ||
|  | RUN git clone https://tea.shupogaki.org/YuruC3/Repo-IP-lists && \
 | ||
|  |     ln -s /etc/customMirrors/Repo-IP-lists/MirrorListV4 /etc/customMirrors/MirrorListV4 && \
 | ||
|  |     ln -s /etc/customMirrors/Repo-IP-lists/MirrorListV6 /etc/customMirrors/MirrorListV6 
 | ||
|  | 
 | ||
|  | # RUN touch /etc/customMirrors/MirrorListV6 && \
 | ||
|  | #     touch /etc/customMirrors/MirrorListV4
 | ||
|  | 
 | ||
|  | COPY mainDocker.py .
 | ||
|  | COPY whatDomain.py .
 | ||
|  | COPY requirements.txt .
 | ||
|  | COPY init.sh .
 | ||
|  | 
 | ||
|  | 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 .
 | ||
|  | 
 | ||
|  | RUN chmod +x ./gitPush.sh
 | ||
|  | 
 | ||
|  | CMD ["bash", "init.sh"]
 | ||
|  | 
 | ||
|  | # CMD ["/usr/sbin/crond", "-f"]
 |