little tweaks

This commit is contained in:
Jeffrey Paul 2016-04-11 02:26:57 +02:00
parent 464ad422e5
commit 8ef7760586
2 changed files with 11 additions and 4 deletions

View File

@ -1,10 +1,12 @@
FROM phusion/baseimage:0.9.17
FROM phusion/baseimage:0.9.18
VOLUME /var/mirror
ADD ./sources.list /etc/apt/sources.list
RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
RUN apt-get update
# phusion baseimage says i'm not supposed to do this
# and i don't care:
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y run-one nginx make debmirror
ADD ./mirror /opt/mirror

View File

@ -3,6 +3,11 @@
# HOME isn't set up for some reason
export HOME=/root
cd /opt/mirror && make
# cleanup previous runs
rm -rf /var/mirror/ubuntu/.temp
sleep ${MIRROR_INTERVAL_SECONDS:-43200}
while true ; do
cd /opt/mirror && make
sleep ${MIRROR_INTERVAL_SECONDS:-43200}
done