docker-ubuntumirror/Dockerfile

28 lines
796 B
Docker
Raw Permalink Normal View History

FROM phusion/baseimage:0.11
2016-04-08 20:41:48 +00:00
VOLUME /var/mirror
2016-04-09 13:11:56 +00:00
ADD ./sources.list /etc/apt/sources.list
2016-04-08 20:41:48 +00:00
RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
2016-04-11 00:26:57 +00:00
# phusion baseimage says i'm not supposed to do this
# and i don't care:
RUN apt-get update && apt-get upgrade -y
2019-01-25 06:10:37 +00:00
RUN apt-get install -y run-one nginx make debmirror xz-utils
2016-04-08 20:41:48 +00:00
ADD ./mirror /opt/mirror
ADD ./mirror.run /etc/service/mirror/run
ADD nginx.conf /etc/nginx/nginx.conf
ADD ./nginx.run /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run && \
chmod +x /etc/service/mirror/run
RUN \
2016-04-08 21:24:53 +00:00
export GNUPGHOME=/etc/debmirror/ubuntu && \
mkdir -p $GNUPGHOME && \
chmod go-rwx $GNUPGHOME && \
2016-04-08 20:41:48 +00:00
gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg && \
2019-01-25 06:10:37 +00:00
cp $GNUPGHOME/pubring.kbx $GNUPGHOME/trustedkeys.kbx
2016-04-08 20:41:48 +00:00
EXPOSE 80